diff options
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/parser/inline/0076_cond.rs | 1 | ||||
-rw-r--r-- | tests/data/parser/inline/0076_cond.txt | 42 | ||||
-rw-r--r-- | tests/data/parser/inline/0077_while_expr.rs | 4 | ||||
-rw-r--r-- | tests/data/parser/inline/0077_while_expr.txt | 64 |
4 files changed, 111 insertions, 0 deletions
diff --git a/tests/data/parser/inline/0076_cond.rs b/tests/data/parser/inline/0076_cond.rs new file mode 100644 index 000000000..fdb37ee6f --- /dev/null +++ b/tests/data/parser/inline/0076_cond.rs | |||
@@ -0,0 +1 @@ | |||
fn foo() { if let Some(_) = None {} } | |||
diff --git a/tests/data/parser/inline/0076_cond.txt b/tests/data/parser/inline/0076_cond.txt new file mode 100644 index 000000000..22eed8458 --- /dev/null +++ b/tests/data/parser/inline/0076_cond.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | FILE@[0; 38) | ||
2 | FN_ITEM@[0; 38) | ||
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; 38) | ||
12 | L_CURLY@[9; 10) | ||
13 | IF_EXPR@[10; 36) | ||
14 | WHITESPACE@[10; 11) | ||
15 | IF_KW@[11; 13) | ||
16 | WHITESPACE@[13; 14) | ||
17 | LET_KW@[14; 17) | ||
18 | TUPLE_PAT@[17; 26) | ||
19 | PATH@[17; 22) | ||
20 | PATH_SEGMENT@[17; 22) | ||
21 | NAME_REF@[17; 22) | ||
22 | WHITESPACE@[17; 18) | ||
23 | IDENT@[18; 22) "Some" | ||
24 | L_PAREN@[22; 23) | ||
25 | PLACEHOLDER_PAT@[23; 24) | ||
26 | UNDERSCORE@[23; 24) | ||
27 | R_PAREN@[24; 25) | ||
28 | WHITESPACE@[25; 26) | ||
29 | EQ@[26; 27) | ||
30 | PATH_EXPR@[27; 33) | ||
31 | PATH@[27; 33) | ||
32 | PATH_SEGMENT@[27; 33) | ||
33 | NAME_REF@[27; 33) | ||
34 | WHITESPACE@[27; 28) | ||
35 | IDENT@[28; 32) "None" | ||
36 | WHITESPACE@[32; 33) | ||
37 | BLOCK_EXPR@[33; 36) | ||
38 | L_CURLY@[33; 34) | ||
39 | R_CURLY@[34; 35) | ||
40 | WHITESPACE@[35; 36) | ||
41 | R_CURLY@[36; 37) | ||
42 | WHITESPACE@[37; 38) | ||
diff --git a/tests/data/parser/inline/0077_while_expr.rs b/tests/data/parser/inline/0077_while_expr.rs new file mode 100644 index 000000000..293046a04 --- /dev/null +++ b/tests/data/parser/inline/0077_while_expr.rs | |||
@@ -0,0 +1,4 @@ | |||
1 | fn foo() { | ||
2 | while true {}; | ||
3 | while let Some(x) = it.next() {}; | ||
4 | } | ||
diff --git a/tests/data/parser/inline/0077_while_expr.txt b/tests/data/parser/inline/0077_while_expr.txt new file mode 100644 index 000000000..447b4b880 --- /dev/null +++ b/tests/data/parser/inline/0077_while_expr.txt | |||
@@ -0,0 +1,64 @@ | |||
1 | FILE@[0; 70) | ||
2 | FN_ITEM@[0; 70) | ||
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; 70) | ||
12 | L_CURLY@[9; 10) | ||
13 | EXPR_STMT@[10; 34) | ||
14 | WHILE_EXPR@[10; 28) | ||
15 | WHITESPACE@[10; 15) | ||
16 | WHILE_KW@[15; 20) | ||
17 | LITERAL@[20; 26) | ||
18 | WHITESPACE@[20; 21) | ||
19 | TRUE_KW@[21; 25) | ||
20 | WHITESPACE@[25; 26) | ||
21 | BLOCK_EXPR@[26; 28) | ||
22 | L_CURLY@[26; 27) | ||
23 | R_CURLY@[27; 28) | ||
24 | SEMI@[28; 29) | ||
25 | WHITESPACE@[29; 34) | ||
26 | EXPR_STMT@[34; 68) | ||
27 | WHILE_EXPR@[34; 66) | ||
28 | WHILE_KW@[34; 39) | ||
29 | WHITESPACE@[39; 40) | ||
30 | LET_KW@[40; 43) | ||
31 | TUPLE_PAT@[43; 52) | ||
32 | PATH@[43; 48) | ||
33 | PATH_SEGMENT@[43; 48) | ||
34 | NAME_REF@[43; 48) | ||
35 | WHITESPACE@[43; 44) | ||
36 | IDENT@[44; 48) "Some" | ||
37 | L_PAREN@[48; 49) | ||
38 | BIND_PAT@[49; 50) | ||
39 | NAME@[49; 50) | ||
40 | IDENT@[49; 50) "x" | ||
41 | R_PAREN@[50; 51) | ||
42 | WHITESPACE@[51; 52) | ||
43 | EQ@[52; 53) | ||
44 | METHOD_CALL_EXPR@[53; 64) | ||
45 | PATH_EXPR@[53; 56) | ||
46 | PATH@[53; 56) | ||
47 | PATH_SEGMENT@[53; 56) | ||
48 | NAME_REF@[53; 56) | ||
49 | WHITESPACE@[53; 54) | ||
50 | IDENT@[54; 56) "it" | ||
51 | DOT@[56; 57) | ||
52 | NAME_REF@[57; 61) | ||
53 | IDENT@[57; 61) "next" | ||
54 | ARG_LIST@[61; 64) | ||
55 | L_PAREN@[61; 62) | ||
56 | R_PAREN@[62; 63) | ||
57 | WHITESPACE@[63; 64) | ||
58 | BLOCK_EXPR@[64; 66) | ||
59 | L_CURLY@[64; 65) | ||
60 | R_CURLY@[65; 66) | ||
61 | SEMI@[66; 67) | ||
62 | WHITESPACE@[67; 68) | ||
63 | R_CURLY@[68; 69) | ||
64 | WHITESPACE@[69; 70) | ||