tuple
This commit is contained in:
parent
cfc7aaf9a2
commit
16378e5d48
10 changed files with 59 additions and 0 deletions
2
test/parser_additional/24.in
Normal file
2
test/parser_additional/24.in
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{"x": 1, "y": 2}
|
||||
|
||||
10
test/parser_additional/24.out
Normal file
10
test/parser_additional/24.out
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Module
|
||||
ExprStmt
|
||||
Dict
|
||||
KeyValue
|
||||
String("x")
|
||||
Number(1)
|
||||
KeyValue
|
||||
String("y")
|
||||
Number(2)
|
||||
|
||||
2
test/parser_additional/30.in
Normal file
2
test/parser_additional/30.in
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(lambda a, b: a + b)(3, 4)
|
||||
|
||||
12
test/parser_additional/30.out
Normal file
12
test/parser_additional/30.out
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Module
|
||||
ExprStmt
|
||||
Call
|
||||
Lambda
|
||||
Param(a)
|
||||
Param(b)
|
||||
BinOp(+)
|
||||
Identifier(a)
|
||||
Identifier(b)
|
||||
Number(3)
|
||||
Number(4)
|
||||
|
||||
2
test/parser_additional/31.in
Normal file
2
test/parser_additional/31.in
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{x for x in items}
|
||||
|
||||
7
test/parser_additional/31.out
Normal file
7
test/parser_additional/31.out
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Module
|
||||
ExprStmt
|
||||
SetComp
|
||||
Identifier(x)
|
||||
For(x)
|
||||
Identifier(items)
|
||||
|
||||
2
test/parser_additional/32.in
Normal file
2
test/parser_additional/32.in
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
(x for x in items)
|
||||
|
||||
7
test/parser_additional/32.out
Normal file
7
test/parser_additional/32.out
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Module
|
||||
ExprStmt
|
||||
Generator
|
||||
Identifier(x)
|
||||
For(x)
|
||||
Identifier(items)
|
||||
|
||||
2
test/parser_additional/33.in
Normal file
2
test/parser_additional/33.in
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
[ x*x for x in items if x > 0 ]
|
||||
|
||||
13
test/parser_additional/33.out
Normal file
13
test/parser_additional/33.out
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Module
|
||||
ExprStmt
|
||||
ListComp
|
||||
BinOp(*)
|
||||
Identifier(x)
|
||||
Identifier(x)
|
||||
For(x)
|
||||
Identifier(items)
|
||||
If
|
||||
Compare(>)
|
||||
Identifier(x)
|
||||
Number(0)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue