lexer debug utils
This commit is contained in:
parent
df3a8b58b0
commit
87fb5da13d
9 changed files with 89 additions and 3 deletions
3
test/lexer/1.in
Normal file
3
test/lexer/1.in
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
hello = 42
|
||||
name = "world"
|
||||
x + y - z
|
||||
5
test/lexer/2.in
Normal file
5
test/lexer/2.in
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
def function_name():
|
||||
if condition:
|
||||
return value
|
||||
for item in list:
|
||||
print(item)
|
||||
3
test/lexer/3.in
Normal file
3
test/lexer/3.in
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
x == y != z < > <= >=
|
||||
a + b - c * d / e % f
|
||||
( ) [ ] { } , : . ;
|
||||
3
test/lexer/4.in
Normal file
3
test/lexer/4.in
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
42 3.14 0xFF 0b1010
|
||||
"hello" 'world' """multiline"""
|
||||
'test' "escaped\"quote"
|
||||
8
test/lexer/5.in
Normal file
8
test/lexer/5.in
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
def calculate(a, b=10):
|
||||
result = (a + b) * 2
|
||||
if result > 100:
|
||||
print("Large result:", result)
|
||||
return result
|
||||
|
||||
# This is a comment
|
||||
x = calculate(5, 15)
|
||||
5
test/lexer/6.in
Normal file
5
test/lexer/6.in
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
_private = "valid"
|
||||
var123 = 456
|
||||
CamelCase = True
|
||||
snake_case = False
|
||||
very_long_variable_name_123 = "test"
|
||||
Loading…
Add table
Add a link
Reference in a new issue