diff options
Diffstat (limited to 'tests/data/parser')
-rw-r--r-- | tests/data/parser/inline/0069_match_arm.rs | 6 | ||||
-rw-r--r-- | tests/data/parser/inline/0069_match_arm.txt | 65 | ||||
-rw-r--r-- | tests/data/parser/inline/0070_match_expr.rs | 3 | ||||
-rw-r--r-- | tests/data/parser/inline/0070_match_expr.txt | 28 |
4 files changed, 102 insertions, 0 deletions
diff --git a/tests/data/parser/inline/0069_match_arm.rs b/tests/data/parser/inline/0069_match_arm.rs new file mode 100644 index 000000000..2c0e88414 --- /dev/null +++ b/tests/data/parser/inline/0069_match_arm.rs | |||
@@ -0,0 +1,6 @@ | |||
1 | fn foo() { | ||
2 | match () { | ||
3 | _ => (), | ||
4 | X | Y if Z => (), | ||
5 | }; | ||
6 | } | ||
diff --git a/tests/data/parser/inline/0069_match_arm.txt b/tests/data/parser/inline/0069_match_arm.txt new file mode 100644 index 000000000..efdee2568 --- /dev/null +++ b/tests/data/parser/inline/0069_match_arm.txt | |||
@@ -0,0 +1,65 @@ | |||
1 | FILE@[0; 78) | ||
2 | FN_ITEM@[0; 78) | ||
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; 78) | ||
12 | L_CURLY@[9; 10) | ||
13 | EXPR_STMT@[10; 76) | ||
14 | MATCH_EXPR@[10; 74) | ||
15 | WHITESPACE@[10; 15) | ||
16 | MATCH_KW@[15; 20) | ||
17 | TUPLE_EXPR@[20; 24) | ||
18 | WHITESPACE@[20; 21) | ||
19 | L_PAREN@[21; 22) | ||
20 | R_PAREN@[22; 23) | ||
21 | WHITESPACE@[23; 24) | ||
22 | L_CURLY@[24; 25) | ||
23 | MATCH_ARM@[25; 41) | ||
24 | PLACEHOLDER_PAT@[25; 36) | ||
25 | WHITESPACE@[25; 34) | ||
26 | UNDERSCORE@[34; 35) | ||
27 | WHITESPACE@[35; 36) | ||
28 | FAT_ARROW@[36; 38) | ||
29 | TUPLE_EXPR@[38; 41) | ||
30 | WHITESPACE@[38; 39) | ||
31 | L_PAREN@[39; 40) | ||
32 | R_PAREN@[40; 41) | ||
33 | COMMA@[41; 42) | ||
34 | MATCH_ARM@[42; 67) | ||
35 | BIND_PAT@[42; 53) | ||
36 | NAME@[42; 53) | ||
37 | WHITESPACE@[42; 51) | ||
38 | IDENT@[51; 52) "X" | ||
39 | WHITESPACE@[52; 53) | ||
40 | PIPE@[53; 54) | ||
41 | BIND_PAT@[54; 57) | ||
42 | NAME@[54; 57) | ||
43 | WHITESPACE@[54; 55) | ||
44 | IDENT@[55; 56) "Y" | ||
45 | WHITESPACE@[56; 57) | ||
46 | IF_KW@[57; 59) | ||
47 | PATH_EXPR@[59; 62) | ||
48 | PATH@[59; 62) | ||
49 | PATH_SEGMENT@[59; 62) | ||
50 | NAME_REF@[59; 62) | ||
51 | WHITESPACE@[59; 60) | ||
52 | IDENT@[60; 61) "Z" | ||
53 | WHITESPACE@[61; 62) | ||
54 | FAT_ARROW@[62; 64) | ||
55 | TUPLE_EXPR@[64; 67) | ||
56 | WHITESPACE@[64; 65) | ||
57 | L_PAREN@[65; 66) | ||
58 | R_PAREN@[66; 67) | ||
59 | COMMA@[67; 68) | ||
60 | WHITESPACE@[68; 73) | ||
61 | R_CURLY@[73; 74) | ||
62 | SEMI@[74; 75) | ||
63 | WHITESPACE@[75; 76) | ||
64 | R_CURLY@[76; 77) | ||
65 | WHITESPACE@[77; 78) | ||
diff --git a/tests/data/parser/inline/0070_match_expr.rs b/tests/data/parser/inline/0070_match_expr.rs new file mode 100644 index 000000000..40318b350 --- /dev/null +++ b/tests/data/parser/inline/0070_match_expr.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | fn foo() { | ||
2 | match () { }; | ||
3 | } | ||
diff --git a/tests/data/parser/inline/0070_match_expr.txt b/tests/data/parser/inline/0070_match_expr.txt new file mode 100644 index 000000000..2dc2f4130 --- /dev/null +++ b/tests/data/parser/inline/0070_match_expr.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | FILE@[0; 31) | ||
2 | FN_ITEM@[0; 31) | ||
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; 31) | ||
12 | L_CURLY@[9; 10) | ||
13 | EXPR_STMT@[10; 29) | ||
14 | MATCH_EXPR@[10; 27) | ||
15 | WHITESPACE@[10; 15) | ||
16 | MATCH_KW@[15; 20) | ||
17 | TUPLE_EXPR@[20; 24) | ||
18 | WHITESPACE@[20; 21) | ||
19 | L_PAREN@[21; 22) | ||
20 | R_PAREN@[22; 23) | ||
21 | WHITESPACE@[23; 24) | ||
22 | L_CURLY@[24; 25) | ||
23 | WHITESPACE@[25; 26) | ||
24 | R_CURLY@[26; 27) | ||
25 | SEMI@[27; 28) | ||
26 | WHITESPACE@[28; 29) | ||
27 | R_CURLY@[29; 30) | ||
28 | WHITESPACE@[30; 31) | ||