mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
Reorganize tests into a real spec suite
This commit is contained in:
24
spec/tests/python/test_bytes_escape_codes.txt
Normal file
24
spec/tests/python/test_bytes_escape_codes.txt
Normal file
@ -0,0 +1,24 @@
|
||||
---input---
|
||||
b'\\ \n \x12 \777 \u1234 \U00010348 \N{Plus-Minus Sign}'
|
||||
|
||||
---tokens---
|
||||
'b' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'\\\\' Literal.String.Escape
|
||||
' ' Literal.String.Single
|
||||
'\\n' Literal.String.Escape
|
||||
' ' Literal.String.Single
|
||||
'\\x12' Literal.String.Escape
|
||||
' ' Literal.String.Single
|
||||
'\\777' Literal.String.Escape
|
||||
' ' Literal.String.Single
|
||||
'\\' Literal.String.Single
|
||||
'u1234 ' Literal.String.Single
|
||||
'\\' Literal.String.Single
|
||||
'U00010348 ' Literal.String.Single
|
||||
'\\' Literal.String.Single
|
||||
'N' Literal.String.Single
|
||||
'{' Literal.String.Single
|
||||
'Plus-Minus Sign}' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
75
spec/tests/python/test_floats.txt
Normal file
75
spec/tests/python/test_floats.txt
Normal file
@ -0,0 +1,75 @@
|
||||
---input---
|
||||
123 -11 0 -0 0.5 .5 1. -0.5 +0.5 -.5 -1. 2e1 -2e1 2e -2e +2e e.3 -e.3 11.2e-3 -11.2e-3 5_6 5__6 _5 6_ 5.6_7 5.67_
|
||||
|
||||
---tokens---
|
||||
'123' Literal.Number.Integer
|
||||
' ' Text
|
||||
'-' Operator
|
||||
'11' Literal.Number.Integer
|
||||
' ' Text
|
||||
'0' Literal.Number.Integer
|
||||
' ' Text
|
||||
'-' Operator
|
||||
'0' Literal.Number.Integer
|
||||
' ' Text
|
||||
'0.5' Literal.Number.Float
|
||||
' ' Text
|
||||
'.5' Literal.Number.Float
|
||||
' ' Text
|
||||
'1.' Literal.Number.Float
|
||||
' ' Text
|
||||
'-' Operator
|
||||
'0.5' Literal.Number.Float
|
||||
' ' Text
|
||||
'+' Operator
|
||||
'0.5' Literal.Number.Float
|
||||
' ' Text
|
||||
'-' Operator
|
||||
'.5' Literal.Number.Float
|
||||
' ' Text
|
||||
'-' Operator
|
||||
'1.' Literal.Number.Float
|
||||
' ' Text
|
||||
'2e1' Literal.Number.Float
|
||||
' ' Text
|
||||
'-' Operator
|
||||
'2e1' Literal.Number.Float
|
||||
' ' Text
|
||||
'2' Literal.Number.Integer
|
||||
'e' Name
|
||||
' ' Text
|
||||
'-' Operator
|
||||
'2' Literal.Number.Integer
|
||||
'e' Name
|
||||
' ' Text
|
||||
'+' Operator
|
||||
'2' Literal.Number.Integer
|
||||
'e' Name
|
||||
' ' Text
|
||||
'e' Name
|
||||
'.3' Literal.Number.Float
|
||||
' ' Text
|
||||
'-' Operator
|
||||
'e' Name
|
||||
'.3' Literal.Number.Float
|
||||
' ' Text
|
||||
'11.2e-3' Literal.Number.Float
|
||||
' ' Text
|
||||
'-' Operator
|
||||
'11.2e-3' Literal.Number.Float
|
||||
' ' Text
|
||||
'5_6' Literal.Number.Integer
|
||||
' ' Text
|
||||
'5' Literal.Number.Integer
|
||||
'__6' Name
|
||||
' ' Text
|
||||
'_5' Name
|
||||
' ' Text
|
||||
'6' Literal.Number.Integer
|
||||
'_' Name
|
||||
' ' Text
|
||||
'5.6_7' Literal.Number.Float
|
||||
' ' Text
|
||||
'5.67' Literal.Number.Float
|
||||
'_' Name
|
||||
'\n' Text.Whitespace
|
25
spec/tests/python/test_fstring_01a.txt
Normal file
25
spec/tests/python/test_fstring_01a.txt
Normal file
@ -0,0 +1,25 @@
|
||||
---input---
|
||||
f'My name is {name}, my age next year is {age+1}, my anniversary is {anniversary:%A, %B %d, %Y}.'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'My name is ' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'name' Name
|
||||
'}' Literal.String.Interpol
|
||||
', my age next year is ' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'age' Name
|
||||
'+' Operator
|
||||
'1' Literal.Number.Integer
|
||||
'}' Literal.String.Interpol
|
||||
', my anniversary is ' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'anniversary' Name
|
||||
':' Literal.String.Interpol
|
||||
'%A, %B %d, %Y' Literal.String.Single
|
||||
'}' Literal.String.Interpol
|
||||
'.' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
25
spec/tests/python/test_fstring_01b.txt
Normal file
25
spec/tests/python/test_fstring_01b.txt
Normal file
@ -0,0 +1,25 @@
|
||||
---input---
|
||||
f"My name is {name}, my age next year is {age+1}, my anniversary is {anniversary:%A, %B %d, %Y}."
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'My name is ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'name' Name
|
||||
'}' Literal.String.Interpol
|
||||
', my age next year is ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'age' Name
|
||||
'+' Operator
|
||||
'1' Literal.Number.Integer
|
||||
'}' Literal.String.Interpol
|
||||
', my anniversary is ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'anniversary' Name
|
||||
':' Literal.String.Interpol
|
||||
'%A, %B %d, %Y' Literal.String.Double
|
||||
'}' Literal.String.Interpol
|
||||
'.' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
13
spec/tests/python/test_fstring_02a.txt
Normal file
13
spec/tests/python/test_fstring_02a.txt
Normal file
@ -0,0 +1,13 @@
|
||||
---input---
|
||||
f'He said his name is {name!r}.'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'He said his name is ' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'name' Name
|
||||
'!r}' Literal.String.Interpol
|
||||
'.' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
13
spec/tests/python/test_fstring_02b.txt
Normal file
13
spec/tests/python/test_fstring_02b.txt
Normal file
@ -0,0 +1,13 @@
|
||||
---input---
|
||||
f"He said his name is {name!r}."
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'He said his name is ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'name' Name
|
||||
'!r}' Literal.String.Interpol
|
||||
'.' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
14
spec/tests/python/test_fstring_03a.txt
Normal file
14
spec/tests/python/test_fstring_03a.txt
Normal file
@ -0,0 +1,14 @@
|
||||
---input---
|
||||
f'input={value:#06x}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'input=' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'value' Name
|
||||
':' Literal.String.Interpol
|
||||
'#06x' Literal.String.Single
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
14
spec/tests/python/test_fstring_03b.txt
Normal file
14
spec/tests/python/test_fstring_03b.txt
Normal file
@ -0,0 +1,14 @@
|
||||
---input---
|
||||
f"input={value:#06x}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'input=' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'value' Name
|
||||
':' Literal.String.Interpol
|
||||
'#06x' Literal.String.Double
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
13
spec/tests/python/test_fstring_04a.txt
Normal file
13
spec/tests/python/test_fstring_04a.txt
Normal file
@ -0,0 +1,13 @@
|
||||
---input---
|
||||
f'{"quoted string"}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'quoted string' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
13
spec/tests/python/test_fstring_04b.txt
Normal file
13
spec/tests/python/test_fstring_04b.txt
Normal file
@ -0,0 +1,13 @@
|
||||
---input---
|
||||
f"{'quoted string'}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'quoted string' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
16
spec/tests/python/test_fstring_05a.txt
Normal file
16
spec/tests/python/test_fstring_05a.txt
Normal file
@ -0,0 +1,16 @@
|
||||
---input---
|
||||
f'{f"{inner}"}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'inner' Name
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
16
spec/tests/python/test_fstring_05b.txt
Normal file
16
spec/tests/python/test_fstring_05b.txt
Normal file
@ -0,0 +1,16 @@
|
||||
---input---
|
||||
f"{f'{inner}'}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'inner' Name
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
16
spec/tests/python/test_fstring_06a.txt
Normal file
16
spec/tests/python/test_fstring_06a.txt
Normal file
@ -0,0 +1,16 @@
|
||||
# SyntaxError: f-string expression part cannot include a backslash
|
||||
|
||||
---input---
|
||||
f'{\'quoted string\'}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'\\' Error
|
||||
"'" Literal.String.Single
|
||||
'quoted string' Literal.String.Single
|
||||
"\\'" Literal.String.Escape
|
||||
'}' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
16
spec/tests/python/test_fstring_06b.txt
Normal file
16
spec/tests/python/test_fstring_06b.txt
Normal file
@ -0,0 +1,16 @@
|
||||
# SyntaxError: f-string expression part cannot include a backslash
|
||||
|
||||
---input---
|
||||
f"{\"quoted string\"}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'\\' Error
|
||||
'"' Literal.String.Double
|
||||
'quoted string' Literal.String.Double
|
||||
'\\"' Literal.String.Escape
|
||||
'}' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
17
spec/tests/python/test_fstring_07a.txt
Normal file
17
spec/tests/python/test_fstring_07a.txt
Normal file
@ -0,0 +1,17 @@
|
||||
---input---
|
||||
f'{{ {4*10} }}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{{' Literal.String.Escape
|
||||
' ' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'4' Literal.Number.Integer
|
||||
'*' Operator
|
||||
'10' Literal.Number.Integer
|
||||
'}' Literal.String.Interpol
|
||||
' ' Literal.String.Single
|
||||
'}}' Literal.String.Escape
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
17
spec/tests/python/test_fstring_07b.txt
Normal file
17
spec/tests/python/test_fstring_07b.txt
Normal file
@ -0,0 +1,17 @@
|
||||
---input---
|
||||
f"{{ {4*10} }}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{{' Literal.String.Escape
|
||||
' ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'4' Literal.Number.Integer
|
||||
'*' Operator
|
||||
'10' Literal.Number.Integer
|
||||
'}' Literal.String.Interpol
|
||||
' ' Literal.String.Double
|
||||
'}}' Literal.String.Escape
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
15
spec/tests/python/test_fstring_08a.txt
Normal file
15
spec/tests/python/test_fstring_08a.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
f'{{{4*10}}}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{{' Literal.String.Escape
|
||||
'{' Literal.String.Interpol
|
||||
'4' Literal.Number.Integer
|
||||
'*' Operator
|
||||
'10' Literal.Number.Integer
|
||||
'}' Literal.String.Interpol
|
||||
'}}' Literal.String.Escape
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
15
spec/tests/python/test_fstring_08b.txt
Normal file
15
spec/tests/python/test_fstring_08b.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
f"{{{4*10}}}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{{' Literal.String.Escape
|
||||
'{' Literal.String.Interpol
|
||||
'4' Literal.Number.Integer
|
||||
'*' Operator
|
||||
'10' Literal.Number.Integer
|
||||
'}' Literal.String.Interpol
|
||||
'}}' Literal.String.Escape
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
14
spec/tests/python/test_fstring_09a.txt
Normal file
14
spec/tests/python/test_fstring_09a.txt
Normal file
@ -0,0 +1,14 @@
|
||||
---input---
|
||||
fr'x={4*10}'
|
||||
|
||||
---tokens---
|
||||
'fr' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'x=' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'4' Literal.Number.Integer
|
||||
'*' Operator
|
||||
'10' Literal.Number.Integer
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
14
spec/tests/python/test_fstring_09b.txt
Normal file
14
spec/tests/python/test_fstring_09b.txt
Normal file
@ -0,0 +1,14 @@
|
||||
---input---
|
||||
fr"x={4*10}"
|
||||
|
||||
---tokens---
|
||||
'fr' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'x=' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'4' Literal.Number.Integer
|
||||
'*' Operator
|
||||
'10' Literal.Number.Integer
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
18
spec/tests/python/test_fstring_10a.txt
Normal file
18
spec/tests/python/test_fstring_10a.txt
Normal file
@ -0,0 +1,18 @@
|
||||
---input---
|
||||
f'abc {a["x"]} def'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'abc ' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'a' Name
|
||||
'[' Punctuation
|
||||
'"' Literal.String.Double
|
||||
'x' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
']' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
' def' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
18
spec/tests/python/test_fstring_10b.txt
Normal file
18
spec/tests/python/test_fstring_10b.txt
Normal file
@ -0,0 +1,18 @@
|
||||
---input---
|
||||
f"abc {a['x']} def"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'abc ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'a' Name
|
||||
'[' Punctuation
|
||||
"'" Literal.String.Single
|
||||
'x' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
']' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
' def' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
18
spec/tests/python/test_fstring_11a.txt
Normal file
18
spec/tests/python/test_fstring_11a.txt
Normal file
@ -0,0 +1,18 @@
|
||||
---input---
|
||||
f'''abc {a['x']} def'''
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'''" Literal.String.Single
|
||||
'abc ' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'a' Name
|
||||
'[' Punctuation
|
||||
"'" Literal.String.Single
|
||||
'x' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
']' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
' def' Literal.String.Single
|
||||
"'''" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
18
spec/tests/python/test_fstring_11b.txt
Normal file
18
spec/tests/python/test_fstring_11b.txt
Normal file
@ -0,0 +1,18 @@
|
||||
---input---
|
||||
f"""abc {a["x"]} def"""
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"""' Literal.String.Double
|
||||
'abc ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'a' Name
|
||||
'[' Punctuation
|
||||
'"' Literal.String.Double
|
||||
'x' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
']' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
' def' Literal.String.Double
|
||||
'"""' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
16
spec/tests/python/test_fstring_12a.txt
Normal file
16
spec/tests/python/test_fstring_12a.txt
Normal file
@ -0,0 +1,16 @@
|
||||
---input---
|
||||
f'''{x
|
||||
+1}'''
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'''" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'x' Name
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'+' Operator
|
||||
'1' Literal.Number.Integer
|
||||
'}' Literal.String.Interpol
|
||||
"'''" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
16
spec/tests/python/test_fstring_12b.txt
Normal file
16
spec/tests/python/test_fstring_12b.txt
Normal file
@ -0,0 +1,16 @@
|
||||
---input---
|
||||
f"""{x
|
||||
+1}"""
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"""' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'x' Name
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'+' Operator
|
||||
'1' Literal.Number.Integer
|
||||
'}' Literal.String.Interpol
|
||||
'"""' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
17
spec/tests/python/test_fstring_13a.txt
Normal file
17
spec/tests/python/test_fstring_13a.txt
Normal file
@ -0,0 +1,17 @@
|
||||
---input---
|
||||
f'''{d[0
|
||||
]}'''
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'''" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'd' Name
|
||||
'[' Punctuation
|
||||
'0' Literal.Number.Integer
|
||||
'\n' Text.Whitespace
|
||||
|
||||
']' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
"'''" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
17
spec/tests/python/test_fstring_13b.txt
Normal file
17
spec/tests/python/test_fstring_13b.txt
Normal file
@ -0,0 +1,17 @@
|
||||
---input---
|
||||
f"""{d[0
|
||||
]}"""
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"""' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'd' Name
|
||||
'[' Punctuation
|
||||
'0' Literal.Number.Integer
|
||||
'\n' Text.Whitespace
|
||||
|
||||
']' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
'"""' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
20
spec/tests/python/test_fstring_14a.txt
Normal file
20
spec/tests/python/test_fstring_14a.txt
Normal file
@ -0,0 +1,20 @@
|
||||
---input---
|
||||
f'result: {value:{width}.{precision}}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'result: ' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'value' Name
|
||||
':' Literal.String.Interpol
|
||||
'{' Literal.String.Interpol
|
||||
'width' Name
|
||||
'}' Literal.String.Interpol
|
||||
'.' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'precision' Name
|
||||
'}' Literal.String.Interpol
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
20
spec/tests/python/test_fstring_14b.txt
Normal file
20
spec/tests/python/test_fstring_14b.txt
Normal file
@ -0,0 +1,20 @@
|
||||
---input---
|
||||
f"result: {value:{width}.{precision}}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'result: ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'value' Name
|
||||
':' Literal.String.Interpol
|
||||
'{' Literal.String.Interpol
|
||||
'width' Name
|
||||
'}' Literal.String.Interpol
|
||||
'.' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'precision' Name
|
||||
'}' Literal.String.Interpol
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
42
spec/tests/python/test_fstring_15a.txt
Normal file
42
spec/tests/python/test_fstring_15a.txt
Normal file
@ -0,0 +1,42 @@
|
||||
---input---
|
||||
'a' 'b' f'{x}' '{c}' f'str<{y:^4}>' 'd' 'e'
|
||||
|
||||
---tokens---
|
||||
"'" Literal.String.Single
|
||||
'a' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
' ' Text
|
||||
"'" Literal.String.Single
|
||||
'b' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
' ' Text
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'x' Name
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
' ' Text
|
||||
"'" Literal.String.Single
|
||||
'{c}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
' ' Text
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'str<' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'y' Name
|
||||
':' Literal.String.Interpol
|
||||
'^4' Literal.String.Single
|
||||
'}' Literal.String.Interpol
|
||||
'>' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
' ' Text
|
||||
"'" Literal.String.Single
|
||||
'd' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
' ' Text
|
||||
"'" Literal.String.Single
|
||||
'e' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
42
spec/tests/python/test_fstring_15b.txt
Normal file
42
spec/tests/python/test_fstring_15b.txt
Normal file
@ -0,0 +1,42 @@
|
||||
---input---
|
||||
"a" "b" f"{x}" "{c}" f"str<{y:^4}>" "d" "e"
|
||||
|
||||
---tokens---
|
||||
'"' Literal.String.Double
|
||||
'a' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
' ' Text
|
||||
'"' Literal.String.Double
|
||||
'b' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
' ' Text
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'x' Name
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
' ' Text
|
||||
'"' Literal.String.Double
|
||||
'{c}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
' ' Text
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'str<' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'y' Name
|
||||
':' Literal.String.Interpol
|
||||
'^4' Literal.String.Double
|
||||
'}' Literal.String.Interpol
|
||||
'>' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
' ' Text
|
||||
'"' Literal.String.Double
|
||||
'd' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
' ' Text
|
||||
'"' Literal.String.Double
|
||||
'e' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
18
spec/tests/python/test_fstring_16a.txt
Normal file
18
spec/tests/python/test_fstring_16a.txt
Normal file
@ -0,0 +1,18 @@
|
||||
---input---
|
||||
f'{i}:{d[i]}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'i' Name
|
||||
'}' Literal.String.Interpol
|
||||
':' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'd' Name
|
||||
'[' Punctuation
|
||||
'i' Name
|
||||
']' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
18
spec/tests/python/test_fstring_16b.txt
Normal file
18
spec/tests/python/test_fstring_16b.txt
Normal file
@ -0,0 +1,18 @@
|
||||
---input---
|
||||
f"{i}:{d[i]}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'i' Name
|
||||
'}' Literal.String.Interpol
|
||||
':' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'd' Name
|
||||
'[' Punctuation
|
||||
'i' Name
|
||||
']' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
14
spec/tests/python/test_fstring_17a.txt
Normal file
14
spec/tests/python/test_fstring_17a.txt
Normal file
@ -0,0 +1,14 @@
|
||||
---input---
|
||||
f'x = {x:+3}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'x = ' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'x' Name
|
||||
':' Literal.String.Interpol
|
||||
'+3' Literal.String.Single
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
14
spec/tests/python/test_fstring_17b.txt
Normal file
14
spec/tests/python/test_fstring_17b.txt
Normal file
@ -0,0 +1,14 @@
|
||||
---input---
|
||||
f"x = {x:+3}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'x = ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'x' Name
|
||||
':' Literal.String.Interpol
|
||||
'+3' Literal.String.Double
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
25
spec/tests/python/test_fstring_18a.txt
Normal file
25
spec/tests/python/test_fstring_18a.txt
Normal file
@ -0,0 +1,25 @@
|
||||
---input---
|
||||
f'{fn(lst,2)} {fn(lst,3)}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'fn' Name
|
||||
'(' Punctuation
|
||||
'lst' Name
|
||||
',' Punctuation
|
||||
'2' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
' ' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'fn' Name
|
||||
'(' Punctuation
|
||||
'lst' Name
|
||||
',' Punctuation
|
||||
'3' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
25
spec/tests/python/test_fstring_18b.txt
Normal file
25
spec/tests/python/test_fstring_18b.txt
Normal file
@ -0,0 +1,25 @@
|
||||
---input---
|
||||
f"{fn(lst,2)} {fn(lst,3)}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'fn' Name
|
||||
'(' Punctuation
|
||||
'lst' Name
|
||||
',' Punctuation
|
||||
'2' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
' ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'fn' Name
|
||||
'(' Punctuation
|
||||
'lst' Name
|
||||
',' Punctuation
|
||||
'3' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
46
spec/tests/python/test_fstring_19a.txt
Normal file
46
spec/tests/python/test_fstring_19a.txt
Normal file
@ -0,0 +1,46 @@
|
||||
---input---
|
||||
f'mapping is { {a:b for (a, b) in ((1, 2), (3, 4))} }'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'mapping is ' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
'a' Name
|
||||
':' Punctuation
|
||||
'b' Name
|
||||
' ' Text.Whitespace
|
||||
'for' Keyword
|
||||
' ' Text.Whitespace
|
||||
'(' Punctuation
|
||||
'a' Name
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'b' Name
|
||||
')' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'in' Operator.Word
|
||||
' ' Text.Whitespace
|
||||
'(' Punctuation
|
||||
'(' Punctuation
|
||||
'1' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'2' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'(' Punctuation
|
||||
'3' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'4' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
')' Punctuation
|
||||
'}' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
46
spec/tests/python/test_fstring_19b.txt
Normal file
46
spec/tests/python/test_fstring_19b.txt
Normal file
@ -0,0 +1,46 @@
|
||||
---input---
|
||||
f"mapping is { {a:b for (a, b) in ((1, 2), (3, 4))} }"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'mapping is ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
'a' Name
|
||||
':' Punctuation
|
||||
'b' Name
|
||||
' ' Text.Whitespace
|
||||
'for' Keyword
|
||||
' ' Text.Whitespace
|
||||
'(' Punctuation
|
||||
'a' Name
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'b' Name
|
||||
')' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'in' Operator.Word
|
||||
' ' Text.Whitespace
|
||||
'(' Punctuation
|
||||
'(' Punctuation
|
||||
'1' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'2' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'(' Punctuation
|
||||
'3' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'4' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
')' Punctuation
|
||||
'}' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
17
spec/tests/python/test_fstring_20a.txt
Normal file
17
spec/tests/python/test_fstring_20a.txt
Normal file
@ -0,0 +1,17 @@
|
||||
---input---
|
||||
f'a={d["a"]}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'a=' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'd' Name
|
||||
'[' Punctuation
|
||||
'"' Literal.String.Double
|
||||
'a' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
']' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
17
spec/tests/python/test_fstring_20b.txt
Normal file
17
spec/tests/python/test_fstring_20b.txt
Normal file
@ -0,0 +1,17 @@
|
||||
---input---
|
||||
f"a={d['a']}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'a=' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'd' Name
|
||||
'[' Punctuation
|
||||
"'" Literal.String.Single
|
||||
'a' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
']' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
15
spec/tests/python/test_fstring_21a.txt
Normal file
15
spec/tests/python/test_fstring_21a.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
f'a={d[a]}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'a=' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'd' Name
|
||||
'[' Punctuation
|
||||
'a' Name
|
||||
']' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
15
spec/tests/python/test_fstring_21b.txt
Normal file
15
spec/tests/python/test_fstring_21b.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
f"a={d[a]}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'a=' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'd' Name
|
||||
'[' Punctuation
|
||||
'a' Name
|
||||
']' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
14
spec/tests/python/test_fstring_22a.txt
Normal file
14
spec/tests/python/test_fstring_22a.txt
Normal file
@ -0,0 +1,14 @@
|
||||
---input---
|
||||
fr'{header}:\s+'
|
||||
|
||||
---tokens---
|
||||
'fr' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'header' Name
|
||||
'}' Literal.String.Interpol
|
||||
':' Literal.String.Single
|
||||
'\\' Literal.String.Single
|
||||
's+' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
14
spec/tests/python/test_fstring_22b.txt
Normal file
14
spec/tests/python/test_fstring_22b.txt
Normal file
@ -0,0 +1,14 @@
|
||||
---input---
|
||||
fr"{header}:\s+"
|
||||
|
||||
---tokens---
|
||||
'fr' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'header' Name
|
||||
'}' Literal.String.Interpol
|
||||
':' Literal.String.Double
|
||||
'\\' Literal.String.Double
|
||||
's+' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
11
spec/tests/python/test_fstring_23a.txt
Normal file
11
spec/tests/python/test_fstring_23a.txt
Normal file
@ -0,0 +1,11 @@
|
||||
---input---
|
||||
f'{a!r}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'a' Name
|
||||
'!r}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
11
spec/tests/python/test_fstring_23b.txt
Normal file
11
spec/tests/python/test_fstring_23b.txt
Normal file
@ -0,0 +1,11 @@
|
||||
---input---
|
||||
f"{a!r}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'a' Name
|
||||
'!r}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
23
spec/tests/python/test_fstring_24a.txt
Normal file
23
spec/tests/python/test_fstring_24a.txt
Normal file
@ -0,0 +1,23 @@
|
||||
---input---
|
||||
f'{(lambda x: x*2)(3)}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'(' Punctuation
|
||||
'lambda' Keyword
|
||||
' ' Text.Whitespace
|
||||
'x' Name
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'x' Name
|
||||
'*' Operator
|
||||
'2' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
'(' Punctuation
|
||||
'3' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
23
spec/tests/python/test_fstring_24b.txt
Normal file
23
spec/tests/python/test_fstring_24b.txt
Normal file
@ -0,0 +1,23 @@
|
||||
---input---
|
||||
f"{(lambda x: x*2)(3)}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'(' Punctuation
|
||||
'lambda' Keyword
|
||||
' ' Text.Whitespace
|
||||
'x' Name
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'x' Name
|
||||
'*' Operator
|
||||
'2' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
'(' Punctuation
|
||||
'3' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
24
spec/tests/python/test_fstring_25a.txt
Normal file
24
spec/tests/python/test_fstring_25a.txt
Normal file
@ -0,0 +1,24 @@
|
||||
---input---
|
||||
extra = f'{extra},waiters:{len(self._waiters)}'
|
||||
|
||||
---tokens---
|
||||
'extra' Name
|
||||
' ' Text
|
||||
'=' Operator
|
||||
' ' Text
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'extra' Name
|
||||
'}' Literal.String.Interpol
|
||||
',waiters:' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'len' Name.Builtin
|
||||
'(' Punctuation
|
||||
'self' Name.Builtin.Pseudo
|
||||
'.' Operator
|
||||
'_waiters' Name
|
||||
')' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
24
spec/tests/python/test_fstring_25b.txt
Normal file
24
spec/tests/python/test_fstring_25b.txt
Normal file
@ -0,0 +1,24 @@
|
||||
---input---
|
||||
extra = f"{extra},waiters:{len(self._waiters)}"
|
||||
|
||||
---tokens---
|
||||
'extra' Name
|
||||
' ' Text
|
||||
'=' Operator
|
||||
' ' Text
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'extra' Name
|
||||
'}' Literal.String.Interpol
|
||||
',waiters:' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'len' Name.Builtin
|
||||
'(' Punctuation
|
||||
'self' Name.Builtin.Pseudo
|
||||
'.' Operator
|
||||
'_waiters' Name
|
||||
')' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
20
spec/tests/python/test_fstring_26a.txt
Normal file
20
spec/tests/python/test_fstring_26a.txt
Normal file
@ -0,0 +1,20 @@
|
||||
---input---
|
||||
message.append(f" [line {lineno:2d}]")
|
||||
|
||||
---tokens---
|
||||
'message' Name
|
||||
'.' Operator
|
||||
'append' Name
|
||||
'(' Punctuation
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
' [line ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'lineno' Name
|
||||
':' Literal.String.Interpol
|
||||
'2d' Literal.String.Double
|
||||
'}' Literal.String.Interpol
|
||||
']' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
')' Punctuation
|
||||
'\n' Text.Whitespace
|
20
spec/tests/python/test_fstring_26b.txt
Normal file
20
spec/tests/python/test_fstring_26b.txt
Normal file
@ -0,0 +1,20 @@
|
||||
---input---
|
||||
message.append(f' [line {lineno:2d}]')
|
||||
|
||||
---tokens---
|
||||
'message' Name
|
||||
'.' Operator
|
||||
'append' Name
|
||||
'(' Punctuation
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
' [line ' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'lineno' Name
|
||||
':' Literal.String.Interpol
|
||||
'2d' Literal.String.Single
|
||||
'}' Literal.String.Interpol
|
||||
']' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
')' Punctuation
|
||||
'\n' Text.Whitespace
|
11
spec/tests/python/test_fstring_27a.txt
Normal file
11
spec/tests/python/test_fstring_27a.txt
Normal file
@ -0,0 +1,11 @@
|
||||
---input---
|
||||
f"{foo=}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'foo' Name
|
||||
'=}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
11
spec/tests/python/test_fstring_27b.txt
Normal file
11
spec/tests/python/test_fstring_27b.txt
Normal file
@ -0,0 +1,11 @@
|
||||
---input---
|
||||
f'{foo=}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'foo' Name
|
||||
'=}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
11
spec/tests/python/test_fstring_28a.txt
Normal file
11
spec/tests/python/test_fstring_28a.txt
Normal file
@ -0,0 +1,11 @@
|
||||
---input---
|
||||
f'{foo=!s}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'foo' Name
|
||||
'=!s}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
11
spec/tests/python/test_fstring_28b.txt
Normal file
11
spec/tests/python/test_fstring_28b.txt
Normal file
@ -0,0 +1,11 @@
|
||||
---input---
|
||||
f"{foo=!s}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'foo' Name
|
||||
'=!s}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
15
spec/tests/python/test_fstring_29a.txt
Normal file
15
spec/tests/python/test_fstring_29a.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
f"{math.pi=!f:.2f}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'math' Name
|
||||
'.' Operator
|
||||
'pi' Name
|
||||
'=!f:' Literal.String.Interpol
|
||||
'.2f' Literal.String.Double
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
15
spec/tests/python/test_fstring_29b.txt
Normal file
15
spec/tests/python/test_fstring_29b.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
f'{math.pi=!f:.2f}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'math' Name
|
||||
'.' Operator
|
||||
'pi' Name
|
||||
'=!f:' Literal.String.Interpol
|
||||
'.2f' Literal.String.Single
|
||||
'}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
16
spec/tests/python/test_fstring_30a.txt
Normal file
16
spec/tests/python/test_fstring_30a.txt
Normal file
@ -0,0 +1,16 @@
|
||||
---input---
|
||||
f"{ chr(65) =}"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
' ' Text.Whitespace
|
||||
'chr' Name.Builtin
|
||||
'(' Punctuation
|
||||
'65' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'=}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
16
spec/tests/python/test_fstring_30b.txt
Normal file
16
spec/tests/python/test_fstring_30b.txt
Normal file
@ -0,0 +1,16 @@
|
||||
---input---
|
||||
f'{ chr(65) =}'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
' ' Text.Whitespace
|
||||
'chr' Name.Builtin
|
||||
'(' Punctuation
|
||||
'65' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'=}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
15
spec/tests/python/test_fstring_31a.txt
Normal file
15
spec/tests/python/test_fstring_31a.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
f"{chr(65) = }"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'chr' Name.Builtin
|
||||
'(' Punctuation
|
||||
'65' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'= }' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
15
spec/tests/python/test_fstring_31b.txt
Normal file
15
spec/tests/python/test_fstring_31b.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
f'{chr(65) = }'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'chr' Name.Builtin
|
||||
'(' Punctuation
|
||||
'65' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'= }' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
15
spec/tests/python/test_fstring_32a.txt
Normal file
15
spec/tests/python/test_fstring_32a.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
f'*{n=:30}*'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'*' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'n' Name
|
||||
'=:' Literal.String.Interpol
|
||||
'30' Literal.String.Single
|
||||
'}' Literal.String.Interpol
|
||||
'*' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
15
spec/tests/python/test_fstring_32b.txt
Normal file
15
spec/tests/python/test_fstring_32b.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
f"*{n=:30}*"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'*' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'n' Name
|
||||
'=:' Literal.String.Interpol
|
||||
'30' Literal.String.Double
|
||||
'}' Literal.String.Interpol
|
||||
'*' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
15
spec/tests/python/test_fstring_33a.txt
Normal file
15
spec/tests/python/test_fstring_33a.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
f'*{n=!r:30}*'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'*' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'n' Name
|
||||
'=!r:' Literal.String.Interpol
|
||||
'30' Literal.String.Single
|
||||
'}' Literal.String.Interpol
|
||||
'*' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
15
spec/tests/python/test_fstring_33b.txt
Normal file
15
spec/tests/python/test_fstring_33b.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
f"*{n=!r:30}*"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'*' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'n' Name
|
||||
'=!r:' Literal.String.Interpol
|
||||
'30' Literal.String.Double
|
||||
'}' Literal.String.Interpol
|
||||
'*' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
20
spec/tests/python/test_fstring_34a.txt
Normal file
20
spec/tests/python/test_fstring_34a.txt
Normal file
@ -0,0 +1,20 @@
|
||||
---input---
|
||||
f"*{f'{n=}':30}*"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'*' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'n' Name
|
||||
'=}' Literal.String.Interpol
|
||||
"'" Literal.String.Single
|
||||
':' Literal.String.Interpol
|
||||
'30' Literal.String.Double
|
||||
'}' Literal.String.Interpol
|
||||
'*' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
20
spec/tests/python/test_fstring_34b.txt
Normal file
20
spec/tests/python/test_fstring_34b.txt
Normal file
@ -0,0 +1,20 @@
|
||||
---input---
|
||||
f'*{f"{n=}":30}*'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'*' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'n' Name
|
||||
'=}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
':' Literal.String.Interpol
|
||||
'30' Literal.String.Single
|
||||
'}' Literal.String.Interpol
|
||||
'*' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
15
spec/tests/python/test_fstring_35a.txt
Normal file
15
spec/tests/python/test_fstring_35a.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
f'*{n=:+<30}*'
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'" Literal.String.Single
|
||||
'*' Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'n' Name
|
||||
'=:' Literal.String.Interpol
|
||||
'+<30' Literal.String.Single
|
||||
'}' Literal.String.Interpol
|
||||
'*' Literal.String.Single
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
15
spec/tests/python/test_fstring_35b.txt
Normal file
15
spec/tests/python/test_fstring_35b.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
f"*{n=:+<30}*"
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'*' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'n' Name
|
||||
'=:' Literal.String.Interpol
|
||||
'+<30' Literal.String.Double
|
||||
'}' Literal.String.Interpol
|
||||
'*' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
16
spec/tests/python/test_fstring_36a.txt
Normal file
16
spec/tests/python/test_fstring_36a.txt
Normal file
@ -0,0 +1,16 @@
|
||||
---input---
|
||||
|
||||
f'''{foo
|
||||
= !s:20}'''
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
"'''" Literal.String.Single
|
||||
'{' Literal.String.Interpol
|
||||
'foo' Name
|
||||
'\n ' Text.Whitespace
|
||||
'= !s:' Literal.String.Interpol
|
||||
'20' Literal.String.Single
|
||||
'}' Literal.String.Interpol
|
||||
"'''" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
16
spec/tests/python/test_fstring_36b.txt
Normal file
16
spec/tests/python/test_fstring_36b.txt
Normal file
@ -0,0 +1,16 @@
|
||||
---input---
|
||||
|
||||
f"""{foo
|
||||
= !s:20}"""
|
||||
|
||||
---tokens---
|
||||
'f' Literal.String.Affix
|
||||
'"""' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'foo' Name
|
||||
'\n ' Text.Whitespace
|
||||
'= !s:' Literal.String.Interpol
|
||||
'20' Literal.String.Double
|
||||
'}' Literal.String.Interpol
|
||||
'"""' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
55
spec/tests/python/test_needs_name.txt
Normal file
55
spec/tests/python/test_needs_name.txt
Normal file
@ -0,0 +1,55 @@
|
||||
# Tests that '@' is recognized as an Operator
|
||||
|
||||
---input---
|
||||
S = (H @ beta - r).T @ inv(H @ V @ H.T) @ (H @ beta - r)
|
||||
|
||||
---tokens---
|
||||
'S' Name
|
||||
' ' Text
|
||||
'=' Operator
|
||||
' ' Text
|
||||
'(' Punctuation
|
||||
'H' Name
|
||||
' ' Text
|
||||
'@' Operator
|
||||
' ' Text
|
||||
'beta' Name
|
||||
' ' Text
|
||||
'-' Operator
|
||||
' ' Text
|
||||
'r' Name
|
||||
')' Punctuation
|
||||
'.' Operator
|
||||
'T' Name
|
||||
' ' Text
|
||||
'@' Operator
|
||||
' ' Text
|
||||
'inv' Name
|
||||
'(' Punctuation
|
||||
'H' Name
|
||||
' ' Text
|
||||
'@' Operator
|
||||
' ' Text
|
||||
'V' Name
|
||||
' ' Text
|
||||
'@' Operator
|
||||
' ' Text
|
||||
'H' Name
|
||||
'.' Operator
|
||||
'T' Name
|
||||
')' Punctuation
|
||||
' ' Text
|
||||
'@' Operator
|
||||
' ' Text
|
||||
'(' Punctuation
|
||||
'H' Name
|
||||
' ' Text
|
||||
'@' Operator
|
||||
' ' Text
|
||||
'beta' Name
|
||||
' ' Text
|
||||
'-' Operator
|
||||
' ' Text
|
||||
'r' Name
|
||||
')' Punctuation
|
||||
'\n' Text.Whitespace
|
28
spec/tests/python/test_pep_515.txt
Normal file
28
spec/tests/python/test_pep_515.txt
Normal file
@ -0,0 +1,28 @@
|
||||
# Tests that the lexer can parse numeric literals with underscores
|
||||
|
||||
---input---
|
||||
1_000_000
|
||||
1_000.000_001
|
||||
1_000e1_000j
|
||||
0xCAFE_F00D
|
||||
0b_0011_1111_0100_1110
|
||||
0o_777_123
|
||||
|
||||
---tokens---
|
||||
'1_000_000' Literal.Number.Integer
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'1_000.000_001' Literal.Number.Float
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'1_000e1_000j' Literal.Number.Float
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'0xCAFE_F00D' Literal.Number.Hex
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'0b_0011_1111_0100_1110' Literal.Number.Bin
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'0o_777_123' Literal.Number.Oct
|
||||
'\n' Text.Whitespace
|
46
spec/tests/python/test_raw_fstring.txt
Normal file
46
spec/tests/python/test_raw_fstring.txt
Normal file
@ -0,0 +1,46 @@
|
||||
# Tests that the lexer can parse raw f-strings
|
||||
|
||||
---input---
|
||||
rf"m_\nu = x"
|
||||
|
||||
f"m_\nu = {x}"
|
||||
|
||||
rf"m_{{\nu}} = {x}"
|
||||
|
||||
---tokens---
|
||||
'rf' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'm_' Literal.String.Double
|
||||
'\\' Literal.String.Double
|
||||
'nu = x' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'm_' Literal.String.Double
|
||||
'\\n' Literal.String.Escape
|
||||
'u = ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'x' Name
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'rf' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'm_' Literal.String.Double
|
||||
'{{' Literal.String.Escape
|
||||
'\\' Literal.String.Double
|
||||
'nu' Literal.String.Double
|
||||
'}}' Literal.String.Escape
|
||||
' = ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'x' Name
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
'\n' Text.Whitespace
|
67
spec/tests/python/test_soft_kwds.txt
Normal file
67
spec/tests/python/test_soft_kwds.txt
Normal file
@ -0,0 +1,67 @@
|
||||
---input---
|
||||
match spam:
|
||||
case Some(x):
|
||||
print(f"found {x}")
|
||||
case None:
|
||||
print("found nothing")
|
||||
case _:
|
||||
assert False
|
||||
|
||||
---tokens---
|
||||
'match' Keyword
|
||||
' ' Text
|
||||
'spam' Name
|
||||
':' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text
|
||||
'case' Keyword
|
||||
' ' Text
|
||||
'Some' Name
|
||||
'(' Punctuation
|
||||
'x' Name
|
||||
')' Punctuation
|
||||
':' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text
|
||||
'print' Name.Builtin
|
||||
'(' Punctuation
|
||||
'f' Literal.String.Affix
|
||||
'"' Literal.String.Double
|
||||
'found ' Literal.String.Double
|
||||
'{' Literal.String.Interpol
|
||||
'x' Name
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String.Double
|
||||
')' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text
|
||||
'case' Keyword
|
||||
' ' Text
|
||||
'None' Keyword.Constant
|
||||
':' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text
|
||||
'print' Name.Builtin
|
||||
'(' Punctuation
|
||||
'"' Literal.String.Double
|
||||
'found nothing' Literal.String.Double
|
||||
'"' Literal.String.Double
|
||||
')' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text
|
||||
'case' Keyword
|
||||
' ' Text.Whitespace
|
||||
'_' Keyword
|
||||
':' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text
|
||||
'assert' Keyword
|
||||
' ' Text
|
||||
'False' Keyword.Constant
|
||||
'\n' Text.Whitespace
|
20
spec/tests/python/test_string_escape_codes.txt
Normal file
20
spec/tests/python/test_string_escape_codes.txt
Normal file
@ -0,0 +1,20 @@
|
||||
---input---
|
||||
'\\ \n \x12 \777 \u1234 \U00010348 \N{Plus-Minus Sign}'
|
||||
|
||||
---tokens---
|
||||
"'" Literal.String.Single
|
||||
'\\\\' Literal.String.Escape
|
||||
' ' Literal.String.Single
|
||||
'\\n' Literal.String.Escape
|
||||
' ' Literal.String.Single
|
||||
'\\x12' Literal.String.Escape
|
||||
' ' Literal.String.Single
|
||||
'\\777' Literal.String.Escape
|
||||
' ' Literal.String.Single
|
||||
'\\u1234' Literal.String.Escape
|
||||
' ' Literal.String.Single
|
||||
'\\U00010348' Literal.String.Escape
|
||||
' ' Literal.String.Single
|
||||
'\\N{Plus-Minus Sign}' Literal.String.Escape
|
||||
"'" Literal.String.Single
|
||||
'\n' Text.Whitespace
|
21
spec/tests/python/test_walrus_operator.txt
Normal file
21
spec/tests/python/test_walrus_operator.txt
Normal file
@ -0,0 +1,21 @@
|
||||
# Tests that ':=' is recognized as an Operator
|
||||
|
||||
---input---
|
||||
if (a := 2) > 4:
|
||||
|
||||
---tokens---
|
||||
'if' Keyword
|
||||
' ' Text
|
||||
'(' Punctuation
|
||||
'a' Name
|
||||
' ' Text
|
||||
':=' Operator
|
||||
' ' Text
|
||||
'2' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
' ' Text
|
||||
'>' Operator
|
||||
' ' Text
|
||||
'4' Literal.Number.Integer
|
||||
':' Punctuation
|
||||
'\n' Text.Whitespace
|
Reference in New Issue
Block a user