diff options
author | Aleksey Kladov <[email protected]> | 2018-02-10 21:46:17 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-02-10 21:46:28 +0000 |
commit | b097090690f5edbe03f4aa9d042ba26c123699e4 (patch) | |
tree | 5bac76244148ce5b368bc8cb83a05cc184c452a7 /tests/data/parser/err | |
parent | b814d931514cdc250f9156dabd874edf685569d0 (diff) |
G: more types
Diffstat (limited to 'tests/data/parser/err')
-rw-r--r-- | tests/data/parser/err/0000_struct_field_missing_comma.txt | 20 | ||||
-rw-r--r-- | tests/data/parser/err/0003_C++_semicolon.txt | 16 | ||||
-rw-r--r-- | tests/data/parser/err/0006_named_field_recovery.txt | 24 |
3 files changed, 44 insertions, 16 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 f1c772b8d..5196fd718 100644 --- a/tests/data/parser/err/0000_struct_field_missing_comma.txt +++ b/tests/data/parser/err/0000_struct_field_missing_comma.txt | |||
@@ -11,15 +11,23 @@ FILE@[0; 34) | |||
11 | WHITESPACE@[10; 15) | 11 | WHITESPACE@[10; 15) |
12 | IDENT@[15; 16) "a" | 12 | IDENT@[15; 16) "a" |
13 | COLON@[16; 17) | 13 | COLON@[16; 17) |
14 | WHITESPACE@[17; 18) | 14 | PATH_TYPE@[17; 26) |
15 | IDENT@[18; 21) "u32" | 15 | PATH@[17; 26) |
16 | WHITESPACE@[21; 26) | 16 | PATH_SEGMENT@[17; 26) |
17 | NAME_REF@[17; 26) | ||
18 | WHITESPACE@[17; 18) | ||
19 | IDENT@[18; 21) "u32" | ||
20 | WHITESPACE@[21; 26) | ||
17 | err: `expected COMMA` | 21 | err: `expected COMMA` |
18 | NAMED_FIELD@[26; 33) | 22 | NAMED_FIELD@[26; 33) |
19 | NAME@[26; 27) | 23 | NAME@[26; 27) |
20 | IDENT@[26; 27) "b" | 24 | IDENT@[26; 27) "b" |
21 | COLON@[27; 28) | 25 | COLON@[27; 28) |
22 | WHITESPACE@[28; 29) | 26 | PATH_TYPE@[28; 33) |
23 | IDENT@[29; 32) "u32" | 27 | PATH@[28; 33) |
24 | WHITESPACE@[32; 33) | 28 | PATH_SEGMENT@[28; 33) |
29 | NAME_REF@[28; 33) | ||
30 | WHITESPACE@[28; 29) | ||
31 | IDENT@[29; 32) "u32" | ||
32 | WHITESPACE@[32; 33) | ||
25 | R_CURLY@[33; 34) | 33 | R_CURLY@[33; 34) |
diff --git a/tests/data/parser/err/0003_C++_semicolon.txt b/tests/data/parser/err/0003_C++_semicolon.txt index c835a1474..affe8fd09 100644 --- a/tests/data/parser/err/0003_C++_semicolon.txt +++ b/tests/data/parser/err/0003_C++_semicolon.txt | |||
@@ -11,16 +11,24 @@ FILE@[0; 40) | |||
11 | WHITESPACE@[10; 15) | 11 | WHITESPACE@[10; 15) |
12 | IDENT@[15; 16) "a" | 12 | IDENT@[15; 16) "a" |
13 | COLON@[16; 17) | 13 | COLON@[16; 17) |
14 | WHITESPACE@[17; 18) | 14 | PATH_TYPE@[17; 21) |
15 | IDENT@[18; 21) "i32" | 15 | PATH@[17; 21) |
16 | PATH_SEGMENT@[17; 21) | ||
17 | NAME_REF@[17; 21) | ||
18 | WHITESPACE@[17; 18) | ||
19 | IDENT@[18; 21) "i32" | ||
16 | COMMA@[21; 22) | 20 | COMMA@[21; 22) |
17 | NAMED_FIELD@[22; 36) | 21 | NAMED_FIELD@[22; 36) |
18 | NAME@[22; 28) | 22 | NAME@[22; 28) |
19 | WHITESPACE@[22; 27) | 23 | WHITESPACE@[22; 27) |
20 | IDENT@[27; 28) "b" | 24 | IDENT@[27; 28) "b" |
21 | COLON@[28; 29) | 25 | COLON@[28; 29) |
22 | WHITESPACE@[29; 30) | 26 | PATH_TYPE@[29; 36) |
23 | IDENT@[30; 36) "String" | 27 | PATH@[29; 36) |
28 | PATH_SEGMENT@[29; 36) | ||
29 | NAME_REF@[29; 36) | ||
30 | WHITESPACE@[29; 30) | ||
31 | IDENT@[30; 36) "String" | ||
24 | COMMA@[36; 37) | 32 | COMMA@[36; 37) |
25 | WHITESPACE@[37; 38) | 33 | WHITESPACE@[37; 38) |
26 | R_CURLY@[38; 39) | 34 | R_CURLY@[38; 39) |
diff --git a/tests/data/parser/err/0006_named_field_recovery.txt b/tests/data/parser/err/0006_named_field_recovery.txt index b772671e9..2dec74866 100644 --- a/tests/data/parser/err/0006_named_field_recovery.txt +++ b/tests/data/parser/err/0006_named_field_recovery.txt | |||
@@ -11,8 +11,12 @@ FILE@[0; 74) | |||
11 | WHITESPACE@[10; 15) | 11 | WHITESPACE@[10; 15) |
12 | IDENT@[15; 16) "f" | 12 | IDENT@[15; 16) "f" |
13 | COLON@[16; 17) | 13 | COLON@[16; 17) |
14 | WHITESPACE@[17; 18) | 14 | PATH_TYPE@[17; 21) |
15 | IDENT@[18; 21) "u32" | 15 | PATH@[17; 21) |
16 | PATH_SEGMENT@[17; 21) | ||
17 | NAME_REF@[17; 21) | ||
18 | WHITESPACE@[17; 18) | ||
19 | IDENT@[18; 21) "u32" | ||
16 | COMMA@[21; 22) | 20 | COMMA@[21; 22) |
17 | VISIBILITY@[22; 31) | 21 | VISIBILITY@[22; 31) |
18 | WHITESPACE@[22; 27) | 22 | WHITESPACE@[22; 27) |
@@ -42,16 +46,24 @@ FILE@[0; 74) | |||
42 | NAME@[52; 53) | 46 | NAME@[52; 53) |
43 | IDENT@[52; 53) "x" | 47 | IDENT@[52; 53) "x" |
44 | COLON@[53; 54) | 48 | COLON@[53; 54) |
45 | WHITESPACE@[54; 55) | 49 | PATH_TYPE@[54; 58) |
46 | IDENT@[55; 58) "u32" | 50 | PATH@[54; 58) |
51 | PATH_SEGMENT@[54; 58) | ||
52 | NAME_REF@[54; 58) | ||
53 | WHITESPACE@[54; 55) | ||
54 | IDENT@[55; 58) "u32" | ||
47 | COMMA@[58; 59) | 55 | COMMA@[58; 59) |
48 | NAMED_FIELD@[59; 70) | 56 | NAMED_FIELD@[59; 70) |
49 | NAME@[59; 65) | 57 | NAME@[59; 65) |
50 | WHITESPACE@[59; 64) | 58 | WHITESPACE@[59; 64) |
51 | IDENT@[64; 65) "z" | 59 | IDENT@[64; 65) "z" |
52 | COLON@[65; 66) | 60 | COLON@[65; 66) |
53 | WHITESPACE@[66; 67) | 61 | PATH_TYPE@[66; 70) |
54 | IDENT@[67; 70) "f64" | 62 | PATH@[66; 70) |
63 | PATH_SEGMENT@[66; 70) | ||
64 | NAME_REF@[66; 70) | ||
65 | WHITESPACE@[66; 67) | ||
66 | IDENT@[67; 70) "f64" | ||
55 | COMMA@[70; 71) | 67 | COMMA@[70; 71) |
56 | WHITESPACE@[71; 72) | 68 | WHITESPACE@[71; 72) |
57 | R_CURLY@[72; 73) | 69 | R_CURLY@[72; 73) |