diff options
Diffstat (limited to 'tests/data/parser/err')
10 files changed, 37 insertions, 34 deletions
diff --git a/tests/data/parser/err/0000_struct_field_missing_comma.txt b/tests/data/parser/err/0000_struct_field_missing_comma.txt index 5196fd718..2bb3ee6ec 100644 --- a/tests/data/parser/err/0000_struct_field_missing_comma.txt +++ b/tests/data/parser/err/0000_struct_field_missing_comma.txt | |||
@@ -18,7 +18,7 @@ FILE@[0; 34) | |||
18 | WHITESPACE@[17; 18) | 18 | WHITESPACE@[17; 18) |
19 | IDENT@[18; 21) "u32" | 19 | IDENT@[18; 21) "u32" |
20 | WHITESPACE@[21; 26) | 20 | WHITESPACE@[21; 26) |
21 | err: `expected COMMA` | 21 | err: `expected COMMA` |
22 | NAMED_FIELD@[26; 33) | 22 | NAMED_FIELD@[26; 33) |
23 | NAME@[26; 27) | 23 | NAME@[26; 27) |
24 | IDENT@[26; 27) "b" | 24 | IDENT@[26; 27) "b" |
diff --git a/tests/data/parser/err/0001_item_recovery_in_file.txt b/tests/data/parser/err/0001_item_recovery_in_file.txt index e41ddc009..01bd2abe6 100644 --- a/tests/data/parser/err/0001_item_recovery_in_file.txt +++ b/tests/data/parser/err/0001_item_recovery_in_file.txt | |||
@@ -1,10 +1,10 @@ | |||
1 | FILE@[0; 21) | 1 | FILE@[0; 21) |
2 | err: `expected item` | ||
2 | ERROR@[0; 3) | 3 | ERROR@[0; 3) |
3 | err: `expected item` | ||
4 | IF_KW@[0; 2) | 4 | IF_KW@[0; 2) |
5 | WHITESPACE@[2; 3) | 5 | WHITESPACE@[2; 3) |
6 | err: `expected item` | ||
6 | ERROR@[3; 10) | 7 | ERROR@[3; 10) |
7 | err: `expected item` | ||
8 | MATCH_KW@[3; 8) | 8 | MATCH_KW@[3; 8) |
9 | WHITESPACE@[8; 10) | 9 | WHITESPACE@[8; 10) |
10 | STRUCT_ITEM@[10; 21) | 10 | STRUCT_ITEM@[10; 21) |
diff --git a/tests/data/parser/err/0002_duplicate_shebang.txt b/tests/data/parser/err/0002_duplicate_shebang.txt index e7cf7187d..1a4b37da8 100644 --- a/tests/data/parser/err/0002_duplicate_shebang.txt +++ b/tests/data/parser/err/0002_duplicate_shebang.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | FILE@[0; 42) | 1 | FILE@[0; 42) |
2 | SHEBANG@[0; 20) | 2 | SHEBANG@[0; 20) |
3 | ERROR@[20; 42) | ||
4 | err: `expected item` | 3 | err: `expected item` |
4 | ERROR@[20; 42) | ||
5 | WHITESPACE@[20; 21) | 5 | WHITESPACE@[20; 21) |
6 | SHEBANG@[21; 41) | 6 | SHEBANG@[21; 41) |
7 | WHITESPACE@[41; 42) | 7 | WHITESPACE@[41; 42) |
diff --git a/tests/data/parser/err/0003_C++_semicolon.txt b/tests/data/parser/err/0003_C++_semicolon.txt index affe8fd09..dc3cf6c73 100644 --- a/tests/data/parser/err/0003_C++_semicolon.txt +++ b/tests/data/parser/err/0003_C++_semicolon.txt | |||
@@ -32,7 +32,7 @@ FILE@[0; 40) | |||
32 | COMMA@[36; 37) | 32 | COMMA@[36; 37) |
33 | WHITESPACE@[37; 38) | 33 | WHITESPACE@[37; 38) |
34 | R_CURLY@[38; 39) | 34 | R_CURLY@[38; 39) |
35 | ERROR@[39; 40) | 35 | err: `expected item, found `;` |
36 | err: `expected item, found `;` | ||
37 | consider removing this semicolon` | 36 | consider removing this semicolon` |
37 | ERROR@[39; 40) | ||
38 | SEMI@[39; 40) | 38 | SEMI@[39; 40) |
diff --git a/tests/data/parser/err/0004_use_path_bad_segment.txt b/tests/data/parser/err/0004_use_path_bad_segment.txt index 0a67002ac..d9ff79ebe 100644 --- a/tests/data/parser/err/0004_use_path_bad_segment.txt +++ b/tests/data/parser/err/0004_use_path_bad_segment.txt | |||
@@ -9,13 +9,13 @@ FILE@[0; 12) | |||
9 | WHITESPACE@[3; 4) | 9 | WHITESPACE@[3; 4) |
10 | IDENT@[4; 7) "foo" | 10 | IDENT@[4; 7) "foo" |
11 | COLONCOLON@[7; 9) | 11 | COLONCOLON@[7; 9) |
12 | PATH_SEGMENT@[9; 9) | 12 | err: `expected SEMI` |
13 | err: `expected identifier` | 13 | err: `expected identifier` |
14 | err: `expected SEMI` | 14 | err: `expected item` |
15 | PATH_SEGMENT@[9; 9) | ||
15 | ERROR@[9; 11) | 16 | ERROR@[9; 11) |
16 | err: `expected item` | ||
17 | INT_NUMBER@[9; 11) | 17 | INT_NUMBER@[9; 11) |
18 | ERROR@[11; 12) | 18 | err: `expected item, found `;` |
19 | err: `expected item, found `;` | ||
20 | consider removing this semicolon` | 19 | consider removing this semicolon` |
20 | ERROR@[11; 12) | ||
21 | SEMI@[11; 12) | 21 | SEMI@[11; 12) |
diff --git a/tests/data/parser/err/0005_attribute_recover.txt b/tests/data/parser/err/0005_attribute_recover.txt index 731f5f2f8..74dd38959 100644 --- a/tests/data/parser/err/0005_attribute_recover.txt +++ b/tests/data/parser/err/0005_attribute_recover.txt | |||
@@ -9,12 +9,12 @@ FILE@[0; 54) | |||
9 | META_ITEM@[6; 9) | 9 | META_ITEM@[6; 9) |
10 | IDENT@[6; 9) "foo" | 10 | IDENT@[6; 9) "foo" |
11 | COMMA@[9; 10) | 11 | COMMA@[9; 10) |
12 | ERROR@[10; 12) | ||
13 | err: `expected attribute` | 12 | err: `expected attribute` |
13 | ERROR@[10; 12) | ||
14 | WHITESPACE@[10; 11) | 14 | WHITESPACE@[10; 11) |
15 | PLUS@[11; 12) | 15 | PLUS@[11; 12) |
16 | err: `expected attribute` | ||
16 | ERROR@[12; 14) | 17 | ERROR@[12; 14) |
17 | err: `expected attribute` | ||
18 | COMMA@[12; 13) | 18 | COMMA@[12; 13) |
19 | WHITESPACE@[13; 14) | 19 | WHITESPACE@[13; 14) |
20 | LITERAL@[14; 16) | 20 | LITERAL@[14; 16) |
@@ -43,7 +43,7 @@ FILE@[0; 54) | |||
43 | L_PAREN@[39; 40) | 43 | L_PAREN@[39; 40) |
44 | err: `expected attribute` | 44 | err: `expected attribute` |
45 | WHITESPACE@[40; 41) | 45 | WHITESPACE@[40; 41) |
46 | err: `expected R_BRACK` | 46 | err: `expected R_BRACK` |
47 | FN_KW@[41; 43) | 47 | FN_KW@[41; 43) |
48 | NAME@[43; 47) | 48 | NAME@[43; 47) |
49 | WHITESPACE@[43; 44) | 49 | WHITESPACE@[43; 44) |
diff --git a/tests/data/parser/err/0006_named_field_recovery.txt b/tests/data/parser/err/0006_named_field_recovery.txt index 2dec74866..cb5a9c32c 100644 --- a/tests/data/parser/err/0006_named_field_recovery.txt +++ b/tests/data/parser/err/0006_named_field_recovery.txt | |||
@@ -22,23 +22,26 @@ FILE@[0; 74) | |||
22 | WHITESPACE@[22; 27) | 22 | WHITESPACE@[22; 27) |
23 | PUB_KW@[27; 30) | 23 | PUB_KW@[27; 30) |
24 | WHITESPACE@[30; 31) | 24 | WHITESPACE@[30; 31) |
25 | err: `expected field declaration` | ||
25 | ERROR@[31; 38) | 26 | ERROR@[31; 38) |
26 | err: `expected field declaration` | ||
27 | INT_NUMBER@[31; 33) | 27 | INT_NUMBER@[31; 33) |
28 | WHITESPACE@[33; 38) | 28 | WHITESPACE@[33; 38) |
29 | err: `expected COMMA` | 29 | err: `expected COMMA` |
30 | err: `expected field declaration` | ||
30 | ERROR@[38; 40) | 31 | ERROR@[38; 40) |
31 | err: `expected field declaration` | ||
32 | PLUS@[38; 39) | 32 | PLUS@[38; 39) |
33 | WHITESPACE@[39; 40) | 33 | WHITESPACE@[39; 40) |
34 | err: `expected COMMA` | ||
35 | err: `expected field declaration` | ||
34 | ERROR@[40; 42) | 36 | ERROR@[40; 42) |
35 | err: `expected field declaration` | ||
36 | MINUS@[40; 41) | 37 | MINUS@[40; 41) |
37 | WHITESPACE@[41; 42) | 38 | WHITESPACE@[41; 42) |
39 | err: `expected COMMA` | ||
40 | err: `expected field declaration` | ||
38 | ERROR@[42; 48) | 41 | ERROR@[42; 48) |
39 | err: `expected field declaration` | ||
40 | STAR@[42; 43) | 42 | STAR@[42; 43) |
41 | WHITESPACE@[43; 48) | 43 | WHITESPACE@[43; 48) |
44 | err: `expected COMMA` | ||
42 | NAMED_FIELD@[48; 58) | 45 | NAMED_FIELD@[48; 58) |
43 | VISIBILITY@[48; 52) | 46 | VISIBILITY@[48; 52) |
44 | PUB_KW@[48; 51) | 47 | PUB_KW@[48; 51) |
diff --git a/tests/data/parser/err/0007_stray_curly_in_file.txt b/tests/data/parser/err/0007_stray_curly_in_file.txt index 8a3cb5096..cfc714cc6 100644 --- a/tests/data/parser/err/0007_stray_curly_in_file.txt +++ b/tests/data/parser/err/0007_stray_curly_in_file.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | FILE@[0; 31) | 1 | FILE@[0; 31) |
2 | err: `expected item` | ||
2 | ERROR@[0; 3) | 3 | ERROR@[0; 3) |
3 | err: `expected item` | ||
4 | R_CURLY@[0; 1) | 4 | R_CURLY@[0; 1) |
5 | WHITESPACE@[1; 3) | 5 | WHITESPACE@[1; 3) |
6 | STRUCT_ITEM@[3; 14) | 6 | STRUCT_ITEM@[3; 14) |
@@ -10,8 +10,8 @@ FILE@[0; 31) | |||
10 | IDENT@[10; 11) "S" | 10 | IDENT@[10; 11) "S" |
11 | SEMI@[11; 12) | 11 | SEMI@[11; 12) |
12 | WHITESPACE@[12; 14) | 12 | WHITESPACE@[12; 14) |
13 | err: `expected item` | ||
13 | ERROR@[14; 17) | 14 | ERROR@[14; 17) |
14 | err: `expected item` | ||
15 | R_CURLY@[14; 15) | 15 | R_CURLY@[14; 15) |
16 | WHITESPACE@[15; 17) | 16 | WHITESPACE@[15; 17) |
17 | FN_ITEM@[17; 29) | 17 | FN_ITEM@[17; 29) |
@@ -25,7 +25,7 @@ FILE@[0; 31) | |||
25 | L_CURLY@[25; 26) | 25 | L_CURLY@[25; 26) |
26 | R_CURLY@[26; 27) | 26 | R_CURLY@[26; 27) |
27 | WHITESPACE@[27; 29) | 27 | WHITESPACE@[27; 29) |
28 | err: `expected item` | ||
28 | ERROR@[29; 31) | 29 | ERROR@[29; 31) |
29 | err: `expected item` | ||
30 | R_CURLY@[29; 30) | 30 | R_CURLY@[29; 30) |
31 | WHITESPACE@[30; 31) | 31 | WHITESPACE@[30; 31) |
diff --git a/tests/data/parser/err/0008_item_block_recovery.txt b/tests/data/parser/err/0008_item_block_recovery.txt index 0e2aae7cc..ca332bcf0 100644 --- a/tests/data/parser/err/0008_item_block_recovery.txt +++ b/tests/data/parser/err/0008_item_block_recovery.txt | |||
@@ -12,18 +12,18 @@ FILE@[0; 95) | |||
12 | WHITESPACE@[10; 11) | 12 | WHITESPACE@[10; 11) |
13 | R_CURLY@[11; 12) | 13 | R_CURLY@[11; 12) |
14 | WHITESPACE@[12; 14) | 14 | WHITESPACE@[12; 14) |
15 | err: `expected item` | ||
15 | ERROR@[14; 17) | 16 | ERROR@[14; 17) |
16 | err: `expected item` | ||
17 | IDENT@[14; 17) "bar" | 17 | IDENT@[14; 17) "bar" |
18 | err: `expected item` | ||
18 | ERROR@[17; 18) | 19 | ERROR@[17; 18) |
19 | err: `expected item` | ||
20 | L_PAREN@[17; 18) | 20 | L_PAREN@[17; 18) |
21 | err: `expected item` | ||
21 | ERROR@[18; 20) | 22 | ERROR@[18; 20) |
22 | err: `expected item` | ||
23 | R_PAREN@[18; 19) | 23 | R_PAREN@[18; 19) |
24 | WHITESPACE@[19; 20) | 24 | WHITESPACE@[19; 20) |
25 | err: `expected item` | ||
25 | ERROR@[20; 82) | 26 | ERROR@[20; 82) |
26 | err: `expected item` | ||
27 | L_CURLY@[20; 21) | 27 | L_CURLY@[20; 21) |
28 | WHITESPACE@[21; 26) | 28 | WHITESPACE@[21; 26) |
29 | IF_KW@[26; 28) | 29 | IF_KW@[26; 28) |
diff --git a/tests/data/parser/err/0009_broken_struct_type_parameter.txt b/tests/data/parser/err/0009_broken_struct_type_parameter.txt index 9434a764a..c16c6dffe 100644 --- a/tests/data/parser/err/0009_broken_struct_type_parameter.txt +++ b/tests/data/parser/err/0009_broken_struct_type_parameter.txt | |||
@@ -6,26 +6,26 @@ FILE@[0; 43) | |||
6 | IDENT@[7; 8) "S" | 6 | IDENT@[7; 8) "S" |
7 | TYPE_PARAM_LIST@[8; 12) | 7 | TYPE_PARAM_LIST@[8; 12) |
8 | L_ANGLE@[8; 9) | 8 | L_ANGLE@[8; 9) |
9 | ERROR@[9; 12) | ||
10 | err: `expected type parameter` | 9 | err: `expected type parameter` |
10 | ERROR@[9; 12) | ||
11 | INT_NUMBER@[9; 11) | 11 | INT_NUMBER@[9; 11) |
12 | WHITESPACE@[11; 12) | 12 | WHITESPACE@[11; 12) |
13 | err: `expected COMMA` | 13 | err: `expected COMMA` |
14 | err: `expected R_ANGLE` | 14 | err: `expected R_ANGLE` |
15 | err: `expected `;`, `{`, or `(`` | 15 | err: `expected `;`, `{`, or `(`` |
16 | err: `expected item` | ||
16 | ERROR@[12; 14) | 17 | ERROR@[12; 14) |
17 | err: `expected item` | ||
18 | PLUS@[12; 13) | 18 | PLUS@[12; 13) |
19 | WHITESPACE@[13; 14) | 19 | WHITESPACE@[13; 14) |
20 | err: `expected item` | ||
20 | ERROR@[14; 15) | 21 | ERROR@[14; 15) |
21 | err: `expected item` | ||
22 | INT_NUMBER@[14; 15) | 22 | INT_NUMBER@[14; 15) |
23 | err: `expected item` | ||
23 | ERROR@[15; 17) | 24 | ERROR@[15; 17) |
24 | err: `expected item` | ||
25 | R_ANGLE@[15; 16) | 25 | R_ANGLE@[15; 16) |
26 | WHITESPACE@[16; 17) | 26 | WHITESPACE@[16; 17) |
27 | err: `expected item` | ||
27 | ERROR@[17; 33) | 28 | ERROR@[17; 33) |
28 | err: `expected item` | ||
29 | L_CURLY@[17; 18) | 29 | L_CURLY@[17; 18) |
30 | WHITESPACE@[18; 23) | 30 | WHITESPACE@[18; 23) |
31 | IDENT@[23; 24) "f" | 31 | IDENT@[23; 24) "f" |