mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 22:53:05 -03:00
Reorganize tests into a real spec suite
This commit is contained in:
57
spec/tests/swift/strings.txt
Normal file
57
spec/tests/swift/strings.txt
Normal file
@ -0,0 +1,57 @@
|
||||
---input---
|
||||
func test() {
|
||||
let world = "world"
|
||||
let multi = """
|
||||
hello
|
||||
\(world)
|
||||
!
|
||||
"""
|
||||
return multi
|
||||
}
|
||||
|
||||
---tokens---
|
||||
'func' Keyword.Declaration
|
||||
' ' Text
|
||||
'test' Name.Function
|
||||
'(' Punctuation
|
||||
')' Punctuation
|
||||
' ' Text
|
||||
'{' Punctuation
|
||||
'\n' Text
|
||||
|
||||
' ' Text
|
||||
'let' Keyword.Declaration
|
||||
' ' Text
|
||||
'world' Name.Variable
|
||||
' ' Text
|
||||
'=' Punctuation
|
||||
' ' Text
|
||||
'"' Literal.String
|
||||
'world' Literal.String
|
||||
'"' Literal.String
|
||||
'\n' Text
|
||||
|
||||
' ' Text
|
||||
'let' Keyword.Declaration
|
||||
' ' Text
|
||||
'multi' Name.Variable
|
||||
' ' Text
|
||||
'=' Punctuation
|
||||
' ' Text
|
||||
'"""' Literal.String
|
||||
'\n hello\n ' Literal.String
|
||||
'\\(' Literal.String.Interpol
|
||||
'world' Name
|
||||
')' Literal.String.Interpol
|
||||
'\n !\n ' Literal.String
|
||||
'"""' Literal.String
|
||||
'\n' Text
|
||||
|
||||
' ' Text
|
||||
'return' Keyword
|
||||
' ' Text
|
||||
'multi' Name
|
||||
'\n' Text
|
||||
|
||||
'}' Punctuation
|
||||
'\n' Text
|
Reference in New Issue
Block a user