| 1 |
---input--- |
| 2 |
[strings] |
| 3 |
basic-string = "I'm a basic string. I can contain 'single quotes', \u0055nicode escapes \U0001f61b \U0001F61B, \"escaped\" double quotes, \n and \t more." |
| 4 |
literal-string = 'I am literal string. Escapes like \this have no effect on me. I can contain "double quotes".' |
| 5 |
multiline-basic-string = """ |
| 6 |
I'm a multiline basic string. |
| 7 |
I can span several lines and contain 'single' and "double" quotes |
| 8 |
as well as \u0055nicode escapes. Line continuations \ |
| 9 |
work too. |
| 10 |
""" |
| 11 |
multiline-literal-string = ''' |
| 12 |
I'm a "multiline" 'literal' string. |
| 13 |
Escapes like \this have no effect on me. Neither does this: \ |
| 14 |
it is not a line continuation.''' |
| 15 |
|
| 16 |
---tokens--- |
| 17 |
'[' Keyword |
| 18 |
'strings' Keyword |
| 19 |
']' Keyword |
| 20 |
'\n' Text.Whitespace |
| 21 |
|
| 22 |
'basic-string' Name |
| 23 |
' ' Text.Whitespace |
| 24 |
'=' Operator |
| 25 |
' ' Text.Whitespace |
| 26 |
'"' Literal.String.Double |
| 27 |
"I'm a basic string. I can contain 'single quotes', " Literal.String.Double |
| 28 |
'\\u0055' Literal.String.Escape |
| 29 |
'nicode escapes ' Literal.String.Double |
| 30 |
'\\U0001f61b' Literal.String.Escape |
| 31 |
' ' Literal.String.Double |
| 32 |
'\\U0001F61B' Literal.String.Escape |
| 33 |
', ' Literal.String.Double |
| 34 |
'\\"' Literal.String.Escape |
| 35 |
'escaped' Literal.String.Double |
| 36 |
'\\"' Literal.String.Escape |
| 37 |
' double quotes, ' Literal.String.Double |
| 38 |
'\\n' Literal.String.Escape |
| 39 |
' and ' Literal.String.Double |
| 40 |
'\\t' Literal.String.Escape |
| 41 |
' more.' Literal.String.Double |
| 42 |
'"' Literal.String.Double |
| 43 |
'\n' Text.Whitespace |
| 44 |
|
| 45 |
'literal-string' Name |
| 46 |
' ' Text.Whitespace |
| 47 |
'=' Operator |
| 48 |
' ' Text.Whitespace |
| 49 |
"'" Literal.String.Single |
| 50 |
'I am literal string. Escapes like \\this have no effect on me. I can contain "double quotes".\'' Literal.String.Single |
| 51 |
'\n' Text.Whitespace |
| 52 |
|
| 53 |
'multiline-basic-string' Name |
| 54 |
' ' Text.Whitespace |
| 55 |
'=' Operator |
| 56 |
' ' Text.Whitespace |
| 57 |
'"""' Literal.String.Double |
| 58 |
"\nI'm a multiline basic string.\nI can span several lines and contain 'single' and " Literal.String.Double |
| 59 |
'"' Literal.String.Double |
| 60 |
'double' Literal.String.Double |
| 61 |
'"' Literal.String.Double |
| 62 |
' quotes\nas well as ' Literal.String.Double |
| 63 |
'\\u0055' Literal.String.Escape |
| 64 |
'nicode escapes. Line continuations ' Literal.String.Double |
| 65 |
'\\' Literal.String.Escape |
| 66 |
'\n' Text.Whitespace |
| 67 |
|
| 68 |
' work too.\n' Literal.String.Double |
| 69 |
|
| 70 |
'"""' Literal.String.Double |
| 71 |
'\n' Text.Whitespace |
| 72 |
|
| 73 |
'multiline-literal-string' Name |
| 74 |
' ' Text.Whitespace |
| 75 |
'=' Operator |
| 76 |
' ' Text.Whitespace |
| 77 |
"'''" Literal.String.Single |
| 78 |
'\nI' Literal.String.Single |
| 79 |
"'" Literal.String.Single |
| 80 |
'm a "multiline" ' Literal.String.Single |
| 81 |
"'" Literal.String.Single |
| 82 |
'literal' Literal.String.Single |
| 83 |
"'" Literal.String.Single |
| 84 |
' string.\nEscapes like \\this have no effect on me. Neither does this: \\\n it is not a line continuation.' Literal.String.Single |
| 85 |
"'''" Literal.String.Single |
| 86 |
'\n' Text.Whitespace |