diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/parser/inline/0085_for_expr.rs | 3 | ||||
-rw-r--r-- | tests/data/parser/inline/0085_for_expr.txt | 34 | ||||
-rw-r--r-- | tests/data/parser/inline/0086_array_expr.rs | 6 | ||||
-rw-r--r-- | tests/data/parser/inline/0086_array_expr.txt | 54 |
4 files changed, 97 insertions, 0 deletions
diff --git a/tests/data/parser/inline/0085_for_expr.rs b/tests/data/parser/inline/0085_for_expr.rs new file mode 100644 index 000000000..972197d2a --- /dev/null +++ b/tests/data/parser/inline/0085_for_expr.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | fn foo() { | ||
2 | for x in [] {}; | ||
3 | } | ||
diff --git a/tests/data/parser/inline/0085_for_expr.txt b/tests/data/parser/inline/0085_for_expr.txt new file mode 100644 index 000000000..33dc86ca0 --- /dev/null +++ b/tests/data/parser/inline/0085_for_expr.txt | |||
@@ -0,0 +1,34 @@ | |||
1 | FILE@[0; 33) | ||
2 | FN_ITEM@[0; 33) | ||
3 | FN_KW@[0; 2) | ||
4 | NAME@[2; 6) | ||
5 | WHITESPACE@[2; 3) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 9) | ||
8 | L_PAREN@[6; 7) | ||
9 | R_PAREN@[7; 8) | ||
10 | WHITESPACE@[8; 9) | ||
11 | BLOCK_EXPR@[9; 33) | ||
12 | L_CURLY@[9; 10) | ||
13 | EXPR_STMT@[10; 31) | ||
14 | FOR_EXPR@[10; 29) | ||
15 | WHITESPACE@[10; 15) | ||
16 | FOR_KW@[15; 18) | ||
17 | BIND_PAT@[18; 21) | ||
18 | NAME@[18; 21) | ||
19 | WHITESPACE@[18; 19) | ||
20 | IDENT@[19; 20) "x" | ||
21 | WHITESPACE@[20; 21) | ||
22 | IN_KW@[21; 23) | ||
23 | ARRAY_EXPR@[23; 27) | ||
24 | WHITESPACE@[23; 24) | ||
25 | L_BRACK@[24; 25) | ||
26 | R_BRACK@[25; 26) | ||
27 | WHITESPACE@[26; 27) | ||
28 | BLOCK_EXPR@[27; 29) | ||
29 | L_CURLY@[27; 28) | ||
30 | R_CURLY@[28; 29) | ||
31 | SEMI@[29; 30) | ||
32 | WHITESPACE@[30; 31) | ||
33 | R_CURLY@[31; 32) | ||
34 | WHITESPACE@[32; 33) | ||
diff --git a/tests/data/parser/inline/0086_array_expr.rs b/tests/data/parser/inline/0086_array_expr.rs new file mode 100644 index 000000000..4dc1999d1 --- /dev/null +++ b/tests/data/parser/inline/0086_array_expr.rs | |||
@@ -0,0 +1,6 @@ | |||
1 | fn foo() { | ||
2 | []; | ||
3 | [1]; | ||
4 | [1, 2,]; | ||
5 | [1; 2]; | ||
6 | } | ||
diff --git a/tests/data/parser/inline/0086_array_expr.txt b/tests/data/parser/inline/0086_array_expr.txt new file mode 100644 index 000000000..40a9b018c --- /dev/null +++ b/tests/data/parser/inline/0086_array_expr.txt | |||
@@ -0,0 +1,54 @@ | |||
1 | FILE@[0; 55) | ||
2 | FN_ITEM@[0; 55) | ||
3 | FN_KW@[0; 2) | ||
4 | NAME@[2; 6) | ||
5 | WHITESPACE@[2; 3) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 9) | ||
8 | L_PAREN@[6; 7) | ||
9 | R_PAREN@[7; 8) | ||
10 | WHITESPACE@[8; 9) | ||
11 | BLOCK_EXPR@[9; 55) | ||
12 | L_CURLY@[9; 10) | ||
13 | EXPR_STMT@[10; 23) | ||
14 | ARRAY_EXPR@[10; 17) | ||
15 | WHITESPACE@[10; 15) | ||
16 | L_BRACK@[15; 16) | ||
17 | R_BRACK@[16; 17) | ||
18 | SEMI@[17; 18) | ||
19 | WHITESPACE@[18; 23) | ||
20 | EXPR_STMT@[23; 32) | ||
21 | ARRAY_EXPR@[23; 26) | ||
22 | L_BRACK@[23; 24) | ||
23 | LITERAL@[24; 25) | ||
24 | INT_NUMBER@[24; 25) "1" | ||
25 | R_BRACK@[25; 26) | ||
26 | SEMI@[26; 27) | ||
27 | WHITESPACE@[27; 32) | ||
28 | EXPR_STMT@[32; 45) | ||
29 | ARRAY_EXPR@[32; 39) | ||
30 | L_BRACK@[32; 33) | ||
31 | LITERAL@[33; 34) | ||
32 | INT_NUMBER@[33; 34) "1" | ||
33 | COMMA@[34; 35) | ||
34 | LITERAL@[35; 37) | ||
35 | WHITESPACE@[35; 36) | ||
36 | INT_NUMBER@[36; 37) "2" | ||
37 | COMMA@[37; 38) | ||
38 | R_BRACK@[38; 39) | ||
39 | SEMI@[39; 40) | ||
40 | WHITESPACE@[40; 45) | ||
41 | EXPR_STMT@[45; 53) | ||
42 | ARRAY_EXPR@[45; 51) | ||
43 | L_BRACK@[45; 46) | ||
44 | LITERAL@[46; 47) | ||
45 | INT_NUMBER@[46; 47) "1" | ||
46 | SEMI@[47; 48) | ||
47 | LITERAL@[48; 50) | ||
48 | WHITESPACE@[48; 49) | ||
49 | INT_NUMBER@[49; 50) "2" | ||
50 | R_BRACK@[50; 51) | ||
51 | SEMI@[51; 52) | ||
52 | WHITESPACE@[52; 53) | ||
53 | R_CURLY@[53; 54) | ||
54 | WHITESPACE@[54; 55) | ||