diff options
Diffstat (limited to 'tests/data/parser')
-rw-r--r-- | tests/data/parser/err/0008_item_block_recovery.txt | 14 | ||||
-rw-r--r-- | tests/data/parser/inline/0078_mod_contents.rs | 5 | ||||
-rw-r--r-- | tests/data/parser/inline/0078_mod_contents.txt | 62 |
3 files changed, 74 insertions, 7 deletions
diff --git a/tests/data/parser/err/0008_item_block_recovery.txt b/tests/data/parser/err/0008_item_block_recovery.txt index 80253d8af..62ca31080 100644 --- a/tests/data/parser/err/0008_item_block_recovery.txt +++ b/tests/data/parser/err/0008_item_block_recovery.txt | |||
@@ -13,15 +13,15 @@ FILE@[0; 95) | |||
13 | WHITESPACE@[10; 11) | 13 | WHITESPACE@[10; 11) |
14 | R_CURLY@[11; 12) | 14 | R_CURLY@[11; 12) |
15 | WHITESPACE@[12; 14) | 15 | WHITESPACE@[12; 14) |
16 | err: `expected an item` | 16 | MACRO_CALL@[14; 20) |
17 | ERROR@[14; 17) | 17 | PATH@[14; 17) |
18 | IDENT@[14; 17) "bar" | 18 | PATH_SEGMENT@[14; 17) |
19 | err: `expected an item` | 19 | NAME_REF@[14; 17) |
20 | ERROR@[17; 18) | 20 | IDENT@[14; 17) "bar" |
21 | err: `expected EXCL` | ||
21 | L_PAREN@[17; 18) | 22 | L_PAREN@[17; 18) |
22 | err: `expected an item` | ||
23 | ERROR@[18; 20) | ||
24 | R_PAREN@[18; 19) | 23 | R_PAREN@[18; 19) |
24 | err: `expected SEMI` | ||
25 | WHITESPACE@[19; 20) | 25 | WHITESPACE@[19; 20) |
26 | err: `expected an item` | 26 | err: `expected an item` |
27 | ERROR@[20; 82) | 27 | ERROR@[20; 82) |
diff --git a/tests/data/parser/inline/0078_mod_contents.rs b/tests/data/parser/inline/0078_mod_contents.rs new file mode 100644 index 000000000..24a15c5c5 --- /dev/null +++ b/tests/data/parser/inline/0078_mod_contents.rs | |||
@@ -0,0 +1,5 @@ | |||
1 | fn foo() {} | ||
2 | macro_rules! foo {} | ||
3 | foo::bar!(); | ||
4 | super::baz! {} | ||
5 | struct S; | ||
diff --git a/tests/data/parser/inline/0078_mod_contents.txt b/tests/data/parser/inline/0078_mod_contents.txt new file mode 100644 index 000000000..4f97c3ee3 --- /dev/null +++ b/tests/data/parser/inline/0078_mod_contents.txt | |||
@@ -0,0 +1,62 @@ | |||
1 | FILE@[0; 70) | ||
2 | FN_ITEM@[0; 12) | ||
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; 12) | ||
12 | L_CURLY@[9; 10) | ||
13 | R_CURLY@[10; 11) | ||
14 | WHITESPACE@[11; 12) | ||
15 | MACRO_CALL@[12; 32) | ||
16 | PATH@[12; 23) | ||
17 | PATH_SEGMENT@[12; 23) | ||
18 | NAME_REF@[12; 23) | ||
19 | IDENT@[12; 23) "macro_rules" | ||
20 | EXCL@[23; 24) | ||
21 | WHITESPACE@[24; 25) | ||
22 | IDENT@[25; 28) "foo" | ||
23 | WHITESPACE@[28; 29) | ||
24 | L_CURLY@[29; 30) | ||
25 | R_CURLY@[30; 31) | ||
26 | WHITESPACE@[31; 32) | ||
27 | MACRO_CALL@[32; 45) | ||
28 | PATH@[32; 40) | ||
29 | PATH@[32; 35) | ||
30 | PATH_SEGMENT@[32; 35) | ||
31 | NAME_REF@[32; 35) | ||
32 | IDENT@[32; 35) "foo" | ||
33 | COLONCOLON@[35; 37) | ||
34 | PATH_SEGMENT@[37; 40) | ||
35 | NAME_REF@[37; 40) | ||
36 | IDENT@[37; 40) "bar" | ||
37 | EXCL@[40; 41) | ||
38 | L_PAREN@[41; 42) | ||
39 | R_PAREN@[42; 43) | ||
40 | SEMI@[43; 44) | ||
41 | WHITESPACE@[44; 45) | ||
42 | MACRO_CALL@[45; 60) | ||
43 | PATH@[45; 55) | ||
44 | PATH@[45; 50) | ||
45 | PATH_SEGMENT@[45; 50) | ||
46 | SUPER_KW@[45; 50) | ||
47 | COLONCOLON@[50; 52) | ||
48 | PATH_SEGMENT@[52; 55) | ||
49 | NAME_REF@[52; 55) | ||
50 | IDENT@[52; 55) "baz" | ||
51 | EXCL@[55; 56) | ||
52 | WHITESPACE@[56; 57) | ||
53 | L_CURLY@[57; 58) | ||
54 | R_CURLY@[58; 59) | ||
55 | WHITESPACE@[59; 60) | ||
56 | STRUCT_ITEM@[60; 70) | ||
57 | STRUCT_KW@[60; 66) | ||
58 | NAME@[66; 68) | ||
59 | WHITESPACE@[66; 67) | ||
60 | IDENT@[67; 68) "S" | ||
61 | SEMI@[68; 69) | ||
62 | WHITESPACE@[69; 70) | ||