Replace LALRPOP parser with hand-written parser
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
committed by
Dhruv Manilawala
parent
461cdad53a
commit
78ee6441a7
@@ -0,0 +1,40 @@
|
||||
x = (1, 2, 3)
|
||||
|
||||
(x, y) = (1, 2, 3)
|
||||
|
||||
[x, y] = (1, 2, 3)
|
||||
|
||||
x.y = (1, 2, 3)
|
||||
|
||||
x[y] = (1, 2, 3)
|
||||
|
||||
(x, *y) = (1, 2, 3)
|
||||
|
||||
|
||||
# This last group of tests checks that assignments we expect to be parsed
|
||||
# (including some interesting ones) continue to be parsed successfully.
|
||||
|
||||
*foo = 42
|
||||
|
||||
[x, y, z] = [1, 2, 3]
|
||||
|
||||
(x, y, z) = (1, 2, 3)
|
||||
x[0] = 42
|
||||
|
||||
# This is actually a type error, not a syntax error. So check that it
|
||||
# doesn't fail parsing.
|
||||
|
||||
5[0] = 42
|
||||
x[1:2] = [42]
|
||||
|
||||
# This is actually a type error, not a syntax error. So check that it
|
||||
# doesn't fail parsing.
|
||||
5[1:2] = [42]
|
||||
|
||||
foo.bar = 42
|
||||
|
||||
# This is actually an attribute error, not a syntax error. So check that
|
||||
# it doesn't fail parsing.
|
||||
"foo".y = 42
|
||||
|
||||
foo = 42
|
||||
Reference in New Issue
Block a user