diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-01-28 17:53:33 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-01-28 17:53:33 +0000 |
commit | 08def60f16a222895b242d907163d914348894c7 (patch) | |
tree | c47d0cef58945190e9e5dcf40317450cfe0db797 /tests/data | |
parent | 4adf0c20b71f8eb6365893cb1739b1cd33b081cc (diff) | |
parent | d1d47e62445806a7ecfb747989d2cb34989d5d51 (diff) |
Merge #30
30: Skip over balanced parens r=matklad a=matklad
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/parser/err/0008_item_block_recovery.rs | 13 | ||||
-rw-r--r-- | tests/data/parser/err/0008_item_block_recovery.txt | 61 |
2 files changed, 74 insertions, 0 deletions
diff --git a/tests/data/parser/err/0008_item_block_recovery.rs b/tests/data/parser/err/0008_item_block_recovery.rs new file mode 100644 index 000000000..9fcac19b5 --- /dev/null +++ b/tests/data/parser/err/0008_item_block_recovery.rs | |||
@@ -0,0 +1,13 @@ | |||
1 | fn foo() { | ||
2 | } | ||
3 | |||
4 | bar() { | ||
5 | if true { | ||
6 | 1 | ||
7 | } else { | ||
8 | 2 + 3 | ||
9 | } | ||
10 | } | ||
11 | |||
12 | fn baz() { | ||
13 | } | ||
diff --git a/tests/data/parser/err/0008_item_block_recovery.txt b/tests/data/parser/err/0008_item_block_recovery.txt new file mode 100644 index 000000000..4bb66f56a --- /dev/null +++ b/tests/data/parser/err/0008_item_block_recovery.txt | |||
@@ -0,0 +1,61 @@ | |||
1 | FILE@[0; 95) | ||
2 | FN_ITEM@[0; 14) | ||
3 | FN_KW@[0; 2) | ||
4 | WHITESPACE@[2; 3) | ||
5 | IDENT@[3; 6) | ||
6 | L_PAREN@[6; 7) | ||
7 | R_PAREN@[7; 8) | ||
8 | WHITESPACE@[8; 9) | ||
9 | L_CURLY@[9; 10) | ||
10 | WHITESPACE@[10; 11) | ||
11 | R_CURLY@[11; 12) | ||
12 | WHITESPACE@[12; 14) | ||
13 | ERROR@[14; 17) | ||
14 | err: `expected item` | ||
15 | IDENT@[14; 17) | ||
16 | ERROR@[17; 18) | ||
17 | err: `expected item` | ||
18 | L_PAREN@[17; 18) | ||
19 | ERROR@[18; 20) | ||
20 | err: `expected item` | ||
21 | R_PAREN@[18; 19) | ||
22 | WHITESPACE@[19; 20) | ||
23 | ERROR@[20; 82) | ||
24 | err: `expected item` | ||
25 | L_CURLY@[20; 21) | ||
26 | WHITESPACE@[21; 26) | ||
27 | IDENT@[26; 28) | ||
28 | WHITESPACE@[28; 29) | ||
29 | TRUE_KW@[29; 33) | ||
30 | WHITESPACE@[33; 34) | ||
31 | L_CURLY@[34; 35) | ||
32 | WHITESPACE@[35; 44) | ||
33 | INT_NUMBER@[44; 45) | ||
34 | WHITESPACE@[45; 50) | ||
35 | R_CURLY@[50; 51) | ||
36 | WHITESPACE@[51; 52) | ||
37 | IDENT@[52; 56) | ||
38 | WHITESPACE@[56; 57) | ||
39 | L_CURLY@[57; 58) | ||
40 | WHITESPACE@[58; 67) | ||
41 | INT_NUMBER@[67; 68) | ||
42 | WHITESPACE@[68; 69) | ||
43 | PLUS@[69; 70) | ||
44 | WHITESPACE@[70; 71) | ||
45 | INT_NUMBER@[71; 72) | ||
46 | WHITESPACE@[72; 77) | ||
47 | R_CURLY@[77; 78) | ||
48 | WHITESPACE@[78; 79) | ||
49 | R_CURLY@[79; 80) | ||
50 | WHITESPACE@[80; 82) | ||
51 | FN_ITEM@[82; 95) | ||
52 | FN_KW@[82; 84) | ||
53 | WHITESPACE@[84; 85) | ||
54 | IDENT@[85; 88) | ||
55 | L_PAREN@[88; 89) | ||
56 | R_PAREN@[89; 90) | ||
57 | WHITESPACE@[90; 91) | ||
58 | L_CURLY@[91; 92) | ||
59 | WHITESPACE@[92; 93) | ||
60 | R_CURLY@[93; 94) | ||
61 | WHITESPACE@[94; 95) | ||