diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/parser/err/0005_attribute_recover.rs | 8 | ||||
-rw-r--r-- | tests/data/parser/err/0005_attribute_recover.txt | 54 |
2 files changed, 62 insertions, 0 deletions
diff --git a/tests/data/parser/err/0005_attribute_recover.rs b/tests/data/parser/err/0005_attribute_recover.rs new file mode 100644 index 000000000..de7f81628 --- /dev/null +++ b/tests/data/parser/err/0005_attribute_recover.rs | |||
@@ -0,0 +1,8 @@ | |||
1 | #[foo(foo, +, 92)] | ||
2 | fn foo() { | ||
3 | } | ||
4 | |||
5 | |||
6 | #[foo( | ||
7 | fn foo() { | ||
8 | } | ||
diff --git a/tests/data/parser/err/0005_attribute_recover.txt b/tests/data/parser/err/0005_attribute_recover.txt new file mode 100644 index 000000000..10f7b2da3 --- /dev/null +++ b/tests/data/parser/err/0005_attribute_recover.txt | |||
@@ -0,0 +1,54 @@ | |||
1 | FILE@[0; 54) | ||
2 | FN_ITEM@[0; 34) | ||
3 | ATTR@[0; 19) | ||
4 | POUND@[0; 1) | ||
5 | L_BRACK@[1; 2) | ||
6 | META_ITEM@[2; 17) | ||
7 | IDENT@[2; 5) | ||
8 | L_PAREN@[5; 6) | ||
9 | META_ITEM@[6; 9) | ||
10 | IDENT@[6; 9) | ||
11 | COMMA@[9; 10) | ||
12 | ERROR@[10; 12) | ||
13 | err: `expected attribute` | ||
14 | WHITESPACE@[10; 11) | ||
15 | PLUS@[11; 12) | ||
16 | ERROR@[12; 14) | ||
17 | err: `expected attribute` | ||
18 | COMMA@[12; 13) | ||
19 | WHITESPACE@[13; 14) | ||
20 | LITERAL@[14; 16) | ||
21 | INT_NUMBER@[14; 16) | ||
22 | R_PAREN@[16; 17) | ||
23 | R_BRACK@[17; 18) | ||
24 | WHITESPACE@[18; 19) | ||
25 | FN_KW@[19; 21) | ||
26 | WHITESPACE@[21; 22) | ||
27 | IDENT@[22; 25) | ||
28 | L_PAREN@[25; 26) | ||
29 | R_PAREN@[26; 27) | ||
30 | WHITESPACE@[27; 28) | ||
31 | L_CURLY@[28; 29) | ||
32 | WHITESPACE@[29; 30) | ||
33 | R_CURLY@[30; 31) | ||
34 | WHITESPACE@[31; 34) | ||
35 | FN_ITEM@[34; 54) | ||
36 | ATTR@[34; 41) | ||
37 | POUND@[34; 35) | ||
38 | L_BRACK@[35; 36) | ||
39 | META_ITEM@[36; 41) | ||
40 | IDENT@[36; 39) | ||
41 | L_PAREN@[39; 40) | ||
42 | err: `expected attribute` | ||
43 | WHITESPACE@[40; 41) | ||
44 | err: `expected R_BRACK` | ||
45 | FN_KW@[41; 43) | ||
46 | WHITESPACE@[43; 44) | ||
47 | IDENT@[44; 47) | ||
48 | L_PAREN@[47; 48) | ||
49 | R_PAREN@[48; 49) | ||
50 | WHITESPACE@[49; 50) | ||
51 | L_CURLY@[50; 51) | ||
52 | WHITESPACE@[51; 52) | ||
53 | R_CURLY@[52; 53) | ||
54 | WHITESPACE@[53; 54) | ||