diff options
Diffstat (limited to 'tests/data/parser')
4 files changed, 155 insertions, 0 deletions
diff --git a/tests/data/parser/inline/0085_match_arms_commas.rs b/tests/data/parser/inline/0085_match_arms_commas.rs new file mode 100644 index 000000000..1f25d577a --- /dev/null +++ b/tests/data/parser/inline/0085_match_arms_commas.rs | |||
@@ -0,0 +1,7 @@ | |||
1 | fn foo() { | ||
2 | match () { | ||
3 | _ => (), | ||
4 | _ => {} | ||
5 | _ => () | ||
6 | } | ||
7 | } | ||
diff --git a/tests/data/parser/inline/0085_match_arms_commas.txt b/tests/data/parser/inline/0085_match_arms_commas.txt new file mode 100644 index 000000000..6dfc6c9dd --- /dev/null +++ b/tests/data/parser/inline/0085_match_arms_commas.txt | |||
@@ -0,0 +1,57 @@ | |||
1 | FILE@[0; 83) | ||
2 | FN_ITEM@[0; 82) | ||
3 | FN_KW@[0; 2) | ||
4 | WHITESPACE@[2; 3) | ||
5 | NAME@[3; 6) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 8) | ||
8 | L_PAREN@[6; 7) | ||
9 | R_PAREN@[7; 8) | ||
10 | WHITESPACE@[8; 9) | ||
11 | BLOCK_EXPR@[9; 82) | ||
12 | L_CURLY@[9; 10) | ||
13 | WHITESPACE@[10; 15) | ||
14 | MATCH_EXPR@[15; 80) | ||
15 | MATCH_KW@[15; 20) | ||
16 | WHITESPACE@[20; 21) | ||
17 | TUPLE_EXPR@[21; 23) | ||
18 | L_PAREN@[21; 22) | ||
19 | R_PAREN@[22; 23) | ||
20 | WHITESPACE@[23; 24) | ||
21 | L_CURLY@[24; 25) | ||
22 | WHITESPACE@[25; 34) | ||
23 | MATCH_ARM@[34; 41) | ||
24 | PLACEHOLDER_PAT@[34; 35) | ||
25 | UNDERSCORE@[34; 35) | ||
26 | WHITESPACE@[35; 36) | ||
27 | FAT_ARROW@[36; 38) | ||
28 | WHITESPACE@[38; 39) | ||
29 | TUPLE_EXPR@[39; 41) | ||
30 | L_PAREN@[39; 40) | ||
31 | R_PAREN@[40; 41) | ||
32 | COMMA@[41; 42) | ||
33 | WHITESPACE@[42; 51) | ||
34 | MATCH_ARM@[51; 58) | ||
35 | PLACEHOLDER_PAT@[51; 52) | ||
36 | UNDERSCORE@[51; 52) | ||
37 | WHITESPACE@[52; 53) | ||
38 | FAT_ARROW@[53; 55) | ||
39 | WHITESPACE@[55; 56) | ||
40 | BLOCK_EXPR@[56; 58) | ||
41 | L_CURLY@[56; 57) | ||
42 | R_CURLY@[57; 58) | ||
43 | WHITESPACE@[58; 67) | ||
44 | MATCH_ARM@[67; 74) | ||
45 | PLACEHOLDER_PAT@[67; 68) | ||
46 | UNDERSCORE@[67; 68) | ||
47 | WHITESPACE@[68; 69) | ||
48 | FAT_ARROW@[69; 71) | ||
49 | WHITESPACE@[71; 72) | ||
50 | TUPLE_EXPR@[72; 74) | ||
51 | L_PAREN@[72; 73) | ||
52 | R_PAREN@[73; 74) | ||
53 | WHITESPACE@[74; 79) | ||
54 | R_CURLY@[79; 80) | ||
55 | WHITESPACE@[80; 81) | ||
56 | R_CURLY@[81; 82) | ||
57 | WHITESPACE@[82; 83) | ||
diff --git a/tests/data/parser/inline/0086_no_semi_after_block.rs b/tests/data/parser/inline/0086_no_semi_after_block.rs new file mode 100644 index 000000000..d769da43d --- /dev/null +++ b/tests/data/parser/inline/0086_no_semi_after_block.rs | |||
@@ -0,0 +1,9 @@ | |||
1 | fn foo() { | ||
2 | if true {} | ||
3 | loop {} | ||
4 | match () {} | ||
5 | while true {} | ||
6 | for _ in () {} | ||
7 | {} | ||
8 | {} | ||
9 | } | ||
diff --git a/tests/data/parser/inline/0086_no_semi_after_block.txt b/tests/data/parser/inline/0086_no_semi_after_block.txt new file mode 100644 index 000000000..dd05a8a9f --- /dev/null +++ b/tests/data/parser/inline/0086_no_semi_after_block.txt | |||
@@ -0,0 +1,82 @@ | |||
1 | FILE@[0; 107) | ||
2 | FN_ITEM@[0; 106) | ||
3 | FN_KW@[0; 2) | ||
4 | WHITESPACE@[2; 3) | ||
5 | NAME@[3; 6) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 8) | ||
8 | L_PAREN@[6; 7) | ||
9 | R_PAREN@[7; 8) | ||
10 | WHITESPACE@[8; 9) | ||
11 | BLOCK_EXPR@[9; 106) | ||
12 | L_CURLY@[9; 10) | ||
13 | WHITESPACE@[10; 15) | ||
14 | EXPR_STMT@[15; 25) | ||
15 | IF_EXPR@[15; 25) | ||
16 | IF_KW@[15; 17) | ||
17 | WHITESPACE@[17; 18) | ||
18 | LITERAL@[18; 22) | ||
19 | TRUE_KW@[18; 22) | ||
20 | WHITESPACE@[22; 23) | ||
21 | BLOCK_EXPR@[23; 25) | ||
22 | L_CURLY@[23; 24) | ||
23 | R_CURLY@[24; 25) | ||
24 | WHITESPACE@[25; 30) | ||
25 | EXPR_STMT@[30; 37) | ||
26 | LOOP_EXPR@[30; 37) | ||
27 | LOOP_KW@[30; 34) | ||
28 | WHITESPACE@[34; 35) | ||
29 | BLOCK_EXPR@[35; 37) | ||
30 | L_CURLY@[35; 36) | ||
31 | R_CURLY@[36; 37) | ||
32 | WHITESPACE@[37; 42) | ||
33 | EXPR_STMT@[42; 53) | ||
34 | MATCH_EXPR@[42; 53) | ||
35 | MATCH_KW@[42; 47) | ||
36 | WHITESPACE@[47; 48) | ||
37 | TUPLE_EXPR@[48; 50) | ||
38 | L_PAREN@[48; 49) | ||
39 | R_PAREN@[49; 50) | ||
40 | WHITESPACE@[50; 51) | ||
41 | L_CURLY@[51; 52) | ||
42 | R_CURLY@[52; 53) | ||
43 | WHITESPACE@[53; 58) | ||
44 | EXPR_STMT@[58; 71) | ||
45 | WHILE_EXPR@[58; 71) | ||
46 | WHILE_KW@[58; 63) | ||
47 | WHITESPACE@[63; 64) | ||
48 | LITERAL@[64; 68) | ||
49 | TRUE_KW@[64; 68) | ||
50 | WHITESPACE@[68; 69) | ||
51 | BLOCK_EXPR@[69; 71) | ||
52 | L_CURLY@[69; 70) | ||
53 | R_CURLY@[70; 71) | ||
54 | WHITESPACE@[71; 76) | ||
55 | EXPR_STMT@[76; 90) | ||
56 | FOR_EXPR@[76; 90) | ||
57 | FOR_KW@[76; 79) | ||
58 | WHITESPACE@[79; 80) | ||
59 | PLACEHOLDER_PAT@[80; 81) | ||
60 | UNDERSCORE@[80; 81) | ||
61 | WHITESPACE@[81; 82) | ||
62 | IN_KW@[82; 84) | ||
63 | WHITESPACE@[84; 85) | ||
64 | TUPLE_EXPR@[85; 87) | ||
65 | L_PAREN@[85; 86) | ||
66 | R_PAREN@[86; 87) | ||
67 | WHITESPACE@[87; 88) | ||
68 | BLOCK_EXPR@[88; 90) | ||
69 | L_CURLY@[88; 89) | ||
70 | R_CURLY@[89; 90) | ||
71 | WHITESPACE@[90; 95) | ||
72 | EXPR_STMT@[95; 97) | ||
73 | BLOCK_EXPR@[95; 97) | ||
74 | L_CURLY@[95; 96) | ||
75 | R_CURLY@[96; 97) | ||
76 | WHITESPACE@[97; 102) | ||
77 | BLOCK_EXPR@[102; 104) | ||
78 | L_CURLY@[102; 103) | ||
79 | R_CURLY@[103; 104) | ||
80 | WHITESPACE@[104; 105) | ||
81 | R_CURLY@[105; 106) | ||
82 | WHITESPACE@[106; 107) | ||