diff options
Diffstat (limited to 'crates/ra_syntax/tests/data')
4 files changed, 117 insertions, 0 deletions
diff --git a/crates/ra_syntax/tests/data/parser/err/0029_field_completion.rs b/crates/ra_syntax/tests/data/parser/err/0029_field_completion.rs new file mode 100644 index 000000000..a7cdc17bb --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/err/0029_field_completion.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | fn foo(a: A) { | ||
2 | a. | ||
3 | } | ||
diff --git a/crates/ra_syntax/tests/data/parser/err/0029_field_completion.txt b/crates/ra_syntax/tests/data/parser/err/0029_field_completion.txt new file mode 100644 index 000000000..fd2a3f37b --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/err/0029_field_completion.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | SOURCE_FILE@[0; 24) | ||
2 | FN_DEF@[0; 23) | ||
3 | FN_KW@[0; 2) | ||
4 | WHITESPACE@[2; 3) | ||
5 | NAME@[3; 6) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 12) | ||
8 | L_PAREN@[6; 7) | ||
9 | PARAM@[7; 11) | ||
10 | BIND_PAT@[7; 8) | ||
11 | NAME@[7; 8) | ||
12 | IDENT@[7; 8) "a" | ||
13 | COLON@[8; 9) | ||
14 | WHITESPACE@[9; 10) | ||
15 | PATH_TYPE@[10; 11) | ||
16 | PATH@[10; 11) | ||
17 | PATH_SEGMENT@[10; 11) | ||
18 | NAME_REF@[10; 11) | ||
19 | IDENT@[10; 11) "A" | ||
20 | R_PAREN@[11; 12) | ||
21 | WHITESPACE@[12; 13) | ||
22 | BLOCK@[13; 23) | ||
23 | L_CURLY@[13; 14) | ||
24 | WHITESPACE@[14; 19) | ||
25 | FIELD_EXPR@[19; 21) | ||
26 | PATH_EXPR@[19; 20) | ||
27 | PATH@[19; 20) | ||
28 | PATH_SEGMENT@[19; 20) | ||
29 | NAME_REF@[19; 20) | ||
30 | IDENT@[19; 20) "a" | ||
31 | DOT@[20; 21) | ||
32 | err: `expected field name or number` | ||
33 | WHITESPACE@[21; 22) | ||
34 | R_CURLY@[22; 23) | ||
35 | WHITESPACE@[23; 24) | ||
diff --git a/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.rs b/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.rs new file mode 100644 index 000000000..261aad1fb --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.rs | |||
@@ -0,0 +1,6 @@ | |||
1 | fn main() { | ||
2 | let _ = 'c'u32; | ||
3 | let _ = "string"invalid; | ||
4 | let _ = b'b'_suff; | ||
5 | let _ = b"bs"invalid; | ||
6 | } | ||
diff --git a/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.txt b/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.txt new file mode 100644 index 000000000..dc10e9ee7 --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/err/0030_string_suffixes.txt | |||
@@ -0,0 +1,73 @@ | |||
1 | SOURCE_FILE@[0; 112) | ||
2 | FN_DEF@[0; 111) | ||
3 | FN_KW@[0; 2) | ||
4 | WHITESPACE@[2; 3) | ||
5 | NAME@[3; 7) | ||
6 | IDENT@[3; 7) "main" | ||
7 | PARAM_LIST@[7; 9) | ||
8 | L_PAREN@[7; 8) | ||
9 | R_PAREN@[8; 9) | ||
10 | WHITESPACE@[9; 10) | ||
11 | BLOCK@[10; 111) | ||
12 | L_CURLY@[10; 11) | ||
13 | WHITESPACE@[11; 16) | ||
14 | LET_STMT@[16; 27) | ||
15 | LET_KW@[16; 19) | ||
16 | WHITESPACE@[19; 20) | ||
17 | PLACEHOLDER_PAT@[20; 21) | ||
18 | UNDERSCORE@[20; 21) | ||
19 | WHITESPACE@[21; 22) | ||
20 | EQ@[22; 23) | ||
21 | WHITESPACE@[23; 24) | ||
22 | LITERAL@[24; 27) | ||
23 | CHAR@[24; 27) | ||
24 | err: `expected SEMI` | ||
25 | EXPR_STMT@[27; 31) | ||
26 | PATH_EXPR@[27; 30) | ||
27 | PATH@[27; 30) | ||
28 | PATH_SEGMENT@[27; 30) | ||
29 | NAME_REF@[27; 30) | ||
30 | IDENT@[27; 30) "u32" | ||
31 | SEMI@[30; 31) | ||
32 | WHITESPACE@[31; 36) | ||
33 | LET_STMT@[36; 60) | ||
34 | LET_KW@[36; 39) | ||
35 | WHITESPACE@[39; 40) | ||
36 | PLACEHOLDER_PAT@[40; 41) | ||
37 | UNDERSCORE@[40; 41) | ||
38 | WHITESPACE@[41; 42) | ||
39 | EQ@[42; 43) | ||
40 | WHITESPACE@[43; 44) | ||
41 | LITERAL@[44; 59) | ||
42 | STRING@[44; 59) | ||
43 | err: `Invalid literal suffix` | ||
44 | SEMI@[59; 60) | ||
45 | WHITESPACE@[60; 65) | ||
46 | LET_STMT@[65; 83) | ||
47 | LET_KW@[65; 68) | ||
48 | WHITESPACE@[68; 69) | ||
49 | PLACEHOLDER_PAT@[69; 70) | ||
50 | UNDERSCORE@[69; 70) | ||
51 | WHITESPACE@[70; 71) | ||
52 | EQ@[71; 72) | ||
53 | WHITESPACE@[72; 73) | ||
54 | LITERAL@[73; 82) | ||
55 | BYTE@[73; 82) | ||
56 | err: `Invalid literal suffix` | ||
57 | SEMI@[82; 83) | ||
58 | WHITESPACE@[83; 88) | ||
59 | LET_STMT@[88; 109) | ||
60 | LET_KW@[88; 91) | ||
61 | WHITESPACE@[91; 92) | ||
62 | PLACEHOLDER_PAT@[92; 93) | ||
63 | UNDERSCORE@[92; 93) | ||
64 | WHITESPACE@[93; 94) | ||
65 | EQ@[94; 95) | ||
66 | WHITESPACE@[95; 96) | ||
67 | LITERAL@[96; 108) | ||
68 | BYTE_STRING@[96; 108) | ||
69 | err: `Invalid literal suffix` | ||
70 | SEMI@[108; 109) | ||
71 | WHITESPACE@[109; 110) | ||
72 | R_CURLY@[110; 111) | ||
73 | WHITESPACE@[111; 112) | ||