diff options
Diffstat (limited to 'crates/ra_syntax/tests/data/parser/inline/err')
9 files changed, 164 insertions, 164 deletions
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt b/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt index f02027972..3020f9086 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt | |||
@@ -1,27 +1,27 @@ | |||
1 | SOURCE_FILE@[0; 18) | 1 | SOURCE_FILE@[0; 18) |
2 | TYPE_ALIAS_DEF@[0; 12) | 2 | TYPE_ALIAS_DEF@[0; 12) |
3 | TYPE_KW@[0; 4) | 3 | TYPE_KW@[0; 4) "type" |
4 | WHITESPACE@[4; 5) | 4 | WHITESPACE@[4; 5) " " |
5 | NAME@[5; 6) | 5 | NAME@[5; 6) |
6 | IDENT@[5; 6) "T" | 6 | IDENT@[5; 6) "T" |
7 | WHITESPACE@[6; 7) | 7 | WHITESPACE@[6; 7) " " |
8 | EQ@[7; 8) | 8 | EQ@[7; 8) "=" |
9 | WHITESPACE@[8; 9) | 9 | WHITESPACE@[8; 9) " " |
10 | SLICE_TYPE@[9; 12) | 10 | SLICE_TYPE@[9; 12) |
11 | L_BRACK@[9; 10) | 11 | L_BRACK@[9; 10) "[" |
12 | TUPLE_TYPE@[10; 12) | 12 | TUPLE_TYPE@[10; 12) |
13 | L_PAREN@[10; 11) | 13 | L_PAREN@[10; 11) "(" |
14 | R_PAREN@[11; 12) | 14 | R_PAREN@[11; 12) ")" |
15 | err: `expected `;` or `]`` | 15 | err: `expected `;` or `]`` |
16 | err: `expected SEMI` | 16 | err: `expected SEMI` |
17 | WHITESPACE@[12; 13) | 17 | WHITESPACE@[12; 13) " " |
18 | err: `expected an item` | 18 | err: `expected an item` |
19 | ERROR@[13; 15) | 19 | ERROR@[13; 15) |
20 | INT_NUMBER@[13; 15) "92" | 20 | INT_NUMBER@[13; 15) "92" |
21 | err: `expected an item` | 21 | err: `expected an item` |
22 | ERROR@[15; 16) | 22 | ERROR@[15; 16) |
23 | R_BRACK@[15; 16) | 23 | R_BRACK@[15; 16) "]" |
24 | err: `expected an item` | 24 | err: `expected an item` |
25 | ERROR@[16; 17) | 25 | ERROR@[16; 17) |
26 | SEMI@[16; 17) | 26 | SEMI@[16; 17) ";" |
27 | WHITESPACE@[17; 18) | 27 | WHITESPACE@[17; 18) "\n" |
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt b/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt index 8021aee00..d61d8e73e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0002_misplaced_label_err.txt | |||
@@ -1,28 +1,28 @@ | |||
1 | SOURCE_FILE@[0; 30) | 1 | SOURCE_FILE@[0; 30) |
2 | FN_DEF@[0; 29) | 2 | FN_DEF@[0; 29) |
3 | FN_KW@[0; 2) | 3 | FN_KW@[0; 2) "fn" |
4 | WHITESPACE@[2; 3) | 4 | WHITESPACE@[2; 3) " " |
5 | NAME@[3; 7) | 5 | NAME@[3; 7) |
6 | IDENT@[3; 7) "main" | 6 | IDENT@[3; 7) "main" |
7 | PARAM_LIST@[7; 9) | 7 | PARAM_LIST@[7; 9) |
8 | L_PAREN@[7; 8) | 8 | L_PAREN@[7; 8) "(" |
9 | R_PAREN@[8; 9) | 9 | R_PAREN@[8; 9) ")" |
10 | WHITESPACE@[9; 10) | 10 | WHITESPACE@[9; 10) " " |
11 | BLOCK@[10; 29) | 11 | BLOCK@[10; 29) |
12 | L_CURLY@[10; 11) | 12 | L_CURLY@[10; 11) "{" |
13 | WHITESPACE@[11; 16) | 13 | WHITESPACE@[11; 16) "\n " |
14 | EXPR_STMT@[16; 22) | 14 | EXPR_STMT@[16; 22) |
15 | ERROR@[16; 22) | 15 | ERROR@[16; 22) |
16 | LABEL@[16; 22) | 16 | LABEL@[16; 22) |
17 | LIFETIME@[16; 21) "'loop" | 17 | LIFETIME@[16; 21) "\'loop" |
18 | COLON@[21; 22) | 18 | COLON@[21; 22) ":" |
19 | err: `expected a loop` | 19 | err: `expected a loop` |
20 | err: `expected SEMI` | 20 | err: `expected SEMI` |
21 | WHITESPACE@[22; 23) | 21 | WHITESPACE@[22; 23) " " |
22 | IMPL_BLOCK@[23; 27) | 22 | IMPL_BLOCK@[23; 27) |
23 | IMPL_KW@[23; 27) | 23 | IMPL_KW@[23; 27) "impl" |
24 | err: `expected type` | 24 | err: `expected type` |
25 | err: `expected `{`` | 25 | err: `expected `{`` |
26 | WHITESPACE@[27; 28) | 26 | WHITESPACE@[27; 28) "\n" |
27 | R_CURLY@[28; 29) | 27 | R_CURLY@[28; 29) "}" |
28 | WHITESPACE@[29; 30) | 28 | WHITESPACE@[29; 30) "\n" |
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt b/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt index b11171fd0..3d7a6a745 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt | |||
@@ -1,17 +1,17 @@ | |||
1 | SOURCE_FILE@[0; 14) | 1 | SOURCE_FILE@[0; 14) |
2 | TYPE_ALIAS_DEF@[0; 13) | 2 | TYPE_ALIAS_DEF@[0; 13) |
3 | TYPE_KW@[0; 4) | 3 | TYPE_KW@[0; 4) "type" |
4 | WHITESPACE@[4; 5) | 4 | WHITESPACE@[4; 5) " " |
5 | NAME@[5; 6) | 5 | NAME@[5; 6) |
6 | IDENT@[5; 6) "T" | 6 | IDENT@[5; 6) "T" |
7 | WHITESPACE@[6; 7) | 7 | WHITESPACE@[6; 7) " " |
8 | EQ@[7; 8) | 8 | EQ@[7; 8) "=" |
9 | WHITESPACE@[8; 9) | 9 | WHITESPACE@[8; 9) " " |
10 | POINTER_TYPE@[9; 12) | 10 | POINTER_TYPE@[9; 12) |
11 | STAR@[9; 10) | 11 | STAR@[9; 10) "*" |
12 | err: `expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)` | 12 | err: `expected mut or const in raw pointer type (use `*mut T` or `*const T` as appropriate)` |
13 | TUPLE_TYPE@[10; 12) | 13 | TUPLE_TYPE@[10; 12) |
14 | L_PAREN@[10; 11) | 14 | L_PAREN@[10; 11) "(" |
15 | R_PAREN@[11; 12) | 15 | R_PAREN@[11; 12) ")" |
16 | SEMI@[12; 13) | 16 | SEMI@[12; 13) ";" |
17 | WHITESPACE@[13; 14) | 17 | WHITESPACE@[13; 14) "\n" |
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt b/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt index 6875ed016..86f84459a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0004_impl_type.txt | |||
@@ -1,79 +1,79 @@ | |||
1 | SOURCE_FILE@[0; 87) | 1 | SOURCE_FILE@[0; 87) |
2 | IMPL_BLOCK@[0; 12) | 2 | IMPL_BLOCK@[0; 12) |
3 | IMPL_KW@[0; 4) | 3 | IMPL_KW@[0; 4) "impl" |
4 | WHITESPACE@[4; 5) | 4 | WHITESPACE@[4; 5) " " |
5 | PATH_TYPE@[5; 9) | 5 | PATH_TYPE@[5; 9) |
6 | PATH@[5; 9) | 6 | PATH@[5; 9) |
7 | PATH_SEGMENT@[5; 9) | 7 | PATH_SEGMENT@[5; 9) |
8 | NAME_REF@[5; 9) | 8 | NAME_REF@[5; 9) |
9 | IDENT@[5; 9) "Type" | 9 | IDENT@[5; 9) "Type" |
10 | WHITESPACE@[9; 10) | 10 | WHITESPACE@[9; 10) " " |
11 | ITEM_LIST@[10; 12) | 11 | ITEM_LIST@[10; 12) |
12 | L_CURLY@[10; 11) | 12 | L_CURLY@[10; 11) "{" |
13 | R_CURLY@[11; 12) | 13 | R_CURLY@[11; 12) "}" |
14 | WHITESPACE@[12; 13) | 14 | WHITESPACE@[12; 13) "\n" |
15 | IMPL_BLOCK@[13; 33) | 15 | IMPL_BLOCK@[13; 33) |
16 | IMPL_KW@[13; 17) | 16 | IMPL_KW@[13; 17) "impl" |
17 | WHITESPACE@[17; 18) | 17 | WHITESPACE@[17; 18) " " |
18 | PATH_TYPE@[18; 24) | 18 | PATH_TYPE@[18; 24) |
19 | PATH@[18; 24) | 19 | PATH@[18; 24) |
20 | PATH_SEGMENT@[18; 24) | 20 | PATH_SEGMENT@[18; 24) |
21 | NAME_REF@[18; 24) | 21 | NAME_REF@[18; 24) |
22 | IDENT@[18; 24) "Trait1" | 22 | IDENT@[18; 24) "Trait1" |
23 | WHITESPACE@[24; 25) | 23 | WHITESPACE@[24; 25) " " |
24 | FOR_KW@[25; 28) | 24 | FOR_KW@[25; 28) "for" |
25 | WHITESPACE@[28; 29) | 25 | WHITESPACE@[28; 29) " " |
26 | PATH_TYPE@[29; 30) | 26 | PATH_TYPE@[29; 30) |
27 | PATH@[29; 30) | 27 | PATH@[29; 30) |
28 | PATH_SEGMENT@[29; 30) | 28 | PATH_SEGMENT@[29; 30) |
29 | NAME_REF@[29; 30) | 29 | NAME_REF@[29; 30) |
30 | IDENT@[29; 30) "T" | 30 | IDENT@[29; 30) "T" |
31 | WHITESPACE@[30; 31) | 31 | WHITESPACE@[30; 31) " " |
32 | ITEM_LIST@[31; 33) | 32 | ITEM_LIST@[31; 33) |
33 | L_CURLY@[31; 32) | 33 | L_CURLY@[31; 32) "{" |
34 | R_CURLY@[32; 33) | 34 | R_CURLY@[32; 33) "}" |
35 | WHITESPACE@[33; 34) | 35 | WHITESPACE@[33; 34) "\n" |
36 | IMPL_BLOCK@[34; 38) | 36 | IMPL_BLOCK@[34; 38) |
37 | IMPL_KW@[34; 38) | 37 | IMPL_KW@[34; 38) "impl" |
38 | err: `expected trait or type` | 38 | err: `expected trait or type` |
39 | err: `expected `{`` | 39 | err: `expected `{`` |
40 | WHITESPACE@[38; 39) | 40 | WHITESPACE@[38; 39) " " |
41 | IMPL_BLOCK@[39; 54) | 41 | IMPL_BLOCK@[39; 54) |
42 | IMPL_KW@[39; 43) | 42 | IMPL_KW@[39; 43) "impl" |
43 | WHITESPACE@[43; 44) | 43 | WHITESPACE@[43; 44) " " |
44 | PATH_TYPE@[44; 51) | 44 | PATH_TYPE@[44; 51) |
45 | PATH@[44; 51) | 45 | PATH@[44; 51) |
46 | PATH_SEGMENT@[44; 51) | 46 | PATH_SEGMENT@[44; 51) |
47 | NAME_REF@[44; 51) | 47 | NAME_REF@[44; 51) |
48 | IDENT@[44; 51) "NotType" | 48 | IDENT@[44; 51) "NotType" |
49 | WHITESPACE@[51; 52) | 49 | WHITESPACE@[51; 52) " " |
50 | ITEM_LIST@[52; 54) | 50 | ITEM_LIST@[52; 54) |
51 | L_CURLY@[52; 53) | 51 | L_CURLY@[52; 53) "{" |
52 | R_CURLY@[53; 54) | 52 | R_CURLY@[53; 54) "}" |
53 | WHITESPACE@[54; 55) | 53 | WHITESPACE@[54; 55) "\n" |
54 | IMPL_BLOCK@[55; 70) | 54 | IMPL_BLOCK@[55; 70) |
55 | IMPL_KW@[55; 59) | 55 | IMPL_KW@[55; 59) "impl" |
56 | WHITESPACE@[59; 60) | 56 | WHITESPACE@[59; 60) " " |
57 | PATH_TYPE@[60; 66) | 57 | PATH_TYPE@[60; 66) |
58 | PATH@[60; 66) | 58 | PATH@[60; 66) |
59 | PATH_SEGMENT@[60; 66) | 59 | PATH_SEGMENT@[60; 66) |
60 | NAME_REF@[60; 66) | 60 | NAME_REF@[60; 66) |
61 | IDENT@[60; 66) "Trait2" | 61 | IDENT@[60; 66) "Trait2" |
62 | WHITESPACE@[66; 67) | 62 | WHITESPACE@[66; 67) " " |
63 | FOR_KW@[67; 70) | 63 | FOR_KW@[67; 70) "for" |
64 | err: `expected trait or type` | 64 | err: `expected trait or type` |
65 | err: `expected `{`` | 65 | err: `expected `{`` |
66 | WHITESPACE@[70; 71) | 66 | WHITESPACE@[70; 71) " " |
67 | IMPL_BLOCK@[71; 86) | 67 | IMPL_BLOCK@[71; 86) |
68 | IMPL_KW@[71; 75) | 68 | IMPL_KW@[71; 75) "impl" |
69 | WHITESPACE@[75; 76) | 69 | WHITESPACE@[75; 76) " " |
70 | PATH_TYPE@[76; 83) | 70 | PATH_TYPE@[76; 83) |
71 | PATH@[76; 83) | 71 | PATH@[76; 83) |
72 | PATH_SEGMENT@[76; 83) | 72 | PATH_SEGMENT@[76; 83) |
73 | NAME_REF@[76; 83) | 73 | NAME_REF@[76; 83) |
74 | IDENT@[76; 83) "NotType" | 74 | IDENT@[76; 83) "NotType" |
75 | WHITESPACE@[83; 84) | 75 | WHITESPACE@[83; 84) " " |
76 | ITEM_LIST@[84; 86) | 76 | ITEM_LIST@[84; 86) |
77 | L_CURLY@[84; 85) | 77 | L_CURLY@[84; 85) "{" |
78 | R_CURLY@[85; 86) | 78 | R_CURLY@[85; 86) "}" |
79 | WHITESPACE@[86; 87) | 79 | WHITESPACE@[86; 87) "\n" |
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt b/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt index ab879db03..4587525aa 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt | |||
@@ -1,23 +1,23 @@ | |||
1 | SOURCE_FILE@[0; 20) | 1 | SOURCE_FILE@[0; 20) |
2 | TYPE_ALIAS_DEF@[0; 15) | 2 | TYPE_ALIAS_DEF@[0; 15) |
3 | TYPE_KW@[0; 4) | 3 | TYPE_KW@[0; 4) "type" |
4 | WHITESPACE@[4; 5) | 4 | WHITESPACE@[4; 5) " " |
5 | NAME@[5; 6) | 5 | NAME@[5; 6) |
6 | IDENT@[5; 6) "F" | 6 | IDENT@[5; 6) "F" |
7 | WHITESPACE@[6; 7) | 7 | WHITESPACE@[6; 7) " " |
8 | EQ@[7; 8) | 8 | EQ@[7; 8) "=" |
9 | WHITESPACE@[8; 9) | 9 | WHITESPACE@[8; 9) " " |
10 | UNSAFE_KW@[9; 15) | 10 | UNSAFE_KW@[9; 15) "unsafe" |
11 | err: `expected `fn`` | 11 | err: `expected `fn`` |
12 | err: `expected SEMI` | 12 | err: `expected SEMI` |
13 | WHITESPACE@[15; 16) | 13 | WHITESPACE@[15; 16) " " |
14 | err: `expected an item` | 14 | err: `expected an item` |
15 | ERROR@[16; 17) | 15 | ERROR@[16; 17) |
16 | L_PAREN@[16; 17) | 16 | L_PAREN@[16; 17) "(" |
17 | err: `expected an item` | 17 | err: `expected an item` |
18 | ERROR@[17; 18) | 18 | ERROR@[17; 18) |
19 | R_PAREN@[17; 18) | 19 | R_PAREN@[17; 18) ")" |
20 | err: `expected an item` | 20 | err: `expected an item` |
21 | ERROR@[18; 19) | 21 | ERROR@[18; 19) |
22 | SEMI@[18; 19) | 22 | SEMI@[18; 19) ";" |
23 | WHITESPACE@[19; 20) | 23 | WHITESPACE@[19; 20) "\n" |
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt b/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt index d2da2bad7..fefa35c20 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0006_unsafe_block_in_mod.txt | |||
@@ -1,35 +1,35 @@ | |||
1 | SOURCE_FILE@[0; 33) | 1 | SOURCE_FILE@[0; 33) |
2 | FN_DEF@[0; 10) | 2 | FN_DEF@[0; 10) |
3 | FN_KW@[0; 2) | 3 | FN_KW@[0; 2) "fn" |
4 | WHITESPACE@[2; 3) | 4 | WHITESPACE@[2; 3) " " |
5 | NAME@[3; 6) | 5 | NAME@[3; 6) |
6 | IDENT@[3; 6) "foo" | 6 | IDENT@[3; 6) "foo" |
7 | PARAM_LIST@[6; 8) | 7 | PARAM_LIST@[6; 8) |
8 | L_PAREN@[6; 7) | 8 | L_PAREN@[6; 7) "(" |
9 | R_PAREN@[7; 8) | 9 | R_PAREN@[7; 8) ")" |
10 | BLOCK@[8; 10) | 10 | BLOCK@[8; 10) |
11 | L_CURLY@[8; 9) | 11 | L_CURLY@[8; 9) "{" |
12 | R_CURLY@[9; 10) | 12 | R_CURLY@[9; 10) "}" |
13 | WHITESPACE@[10; 11) | 13 | WHITESPACE@[10; 11) " " |
14 | err: `expected an item` | 14 | err: `expected an item` |
15 | ERROR@[11; 17) | 15 | ERROR@[11; 17) |
16 | UNSAFE_KW@[11; 17) | 16 | UNSAFE_KW@[11; 17) "unsafe" |
17 | WHITESPACE@[17; 18) | 17 | WHITESPACE@[17; 18) " " |
18 | err: `expected an item` | 18 | err: `expected an item` |
19 | ERROR@[18; 21) | 19 | ERROR@[18; 21) |
20 | L_CURLY@[18; 19) | 20 | L_CURLY@[18; 19) "{" |
21 | WHITESPACE@[19; 20) | 21 | WHITESPACE@[19; 20) " " |
22 | R_CURLY@[20; 21) | 22 | R_CURLY@[20; 21) "}" |
23 | WHITESPACE@[21; 22) | 23 | WHITESPACE@[21; 22) " " |
24 | FN_DEF@[22; 32) | 24 | FN_DEF@[22; 32) |
25 | FN_KW@[22; 24) | 25 | FN_KW@[22; 24) "fn" |
26 | WHITESPACE@[24; 25) | 26 | WHITESPACE@[24; 25) " " |
27 | NAME@[25; 28) | 27 | NAME@[25; 28) |
28 | IDENT@[25; 28) "bar" | 28 | IDENT@[25; 28) "bar" |
29 | PARAM_LIST@[28; 30) | 29 | PARAM_LIST@[28; 30) |
30 | L_PAREN@[28; 29) | 30 | L_PAREN@[28; 29) "(" |
31 | R_PAREN@[29; 30) | 31 | R_PAREN@[29; 30) ")" |
32 | BLOCK@[30; 32) | 32 | BLOCK@[30; 32) |
33 | L_CURLY@[30; 31) | 33 | L_CURLY@[30; 31) "{" |
34 | R_CURLY@[31; 32) | 34 | R_CURLY@[31; 32) "}" |
35 | WHITESPACE@[32; 33) | 35 | WHITESPACE@[32; 33) "\n" |
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt b/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt index bb9a2d029..8afcd5429 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0007_async_without_semicolon.txt | |||
@@ -1,31 +1,31 @@ | |||
1 | SOURCE_FILE@[0; 30) | 1 | SOURCE_FILE@[0; 30) |
2 | FN_DEF@[0; 29) | 2 | FN_DEF@[0; 29) |
3 | FN_KW@[0; 2) | 3 | FN_KW@[0; 2) "fn" |
4 | WHITESPACE@[2; 3) | 4 | WHITESPACE@[2; 3) " " |
5 | NAME@[3; 6) | 5 | NAME@[3; 6) |
6 | IDENT@[3; 6) "foo" | 6 | IDENT@[3; 6) "foo" |
7 | PARAM_LIST@[6; 8) | 7 | PARAM_LIST@[6; 8) |
8 | L_PAREN@[6; 7) | 8 | L_PAREN@[6; 7) "(" |
9 | R_PAREN@[7; 8) | 9 | R_PAREN@[7; 8) ")" |
10 | WHITESPACE@[8; 9) | 10 | WHITESPACE@[8; 9) " " |
11 | BLOCK@[9; 29) | 11 | BLOCK@[9; 29) |
12 | L_CURLY@[9; 10) | 12 | L_CURLY@[9; 10) "{" |
13 | WHITESPACE@[10; 11) | 13 | WHITESPACE@[10; 11) " " |
14 | LET_STMT@[11; 27) | 14 | LET_STMT@[11; 27) |
15 | LET_KW@[11; 14) | 15 | LET_KW@[11; 14) "let" |
16 | WHITESPACE@[14; 15) | 16 | WHITESPACE@[14; 15) " " |
17 | PLACEHOLDER_PAT@[15; 16) | 17 | PLACEHOLDER_PAT@[15; 16) |
18 | UNDERSCORE@[15; 16) | 18 | UNDERSCORE@[15; 16) "_" |
19 | WHITESPACE@[16; 17) | 19 | WHITESPACE@[16; 17) " " |
20 | EQ@[17; 18) | 20 | EQ@[17; 18) "=" |
21 | WHITESPACE@[18; 19) | 21 | WHITESPACE@[18; 19) " " |
22 | BLOCK_EXPR@[19; 27) | 22 | BLOCK_EXPR@[19; 27) |
23 | ASYNC_KW@[19; 24) | 23 | ASYNC_KW@[19; 24) "async" |
24 | WHITESPACE@[24; 25) | 24 | WHITESPACE@[24; 25) " " |
25 | BLOCK@[25; 27) | 25 | BLOCK@[25; 27) |
26 | L_CURLY@[25; 26) | 26 | L_CURLY@[25; 26) "{" |
27 | R_CURLY@[26; 27) | 27 | R_CURLY@[26; 27) "}" |
28 | err: `expected SEMI` | 28 | err: `expected SEMI` |
29 | WHITESPACE@[27; 28) | 29 | WHITESPACE@[27; 28) " " |
30 | R_CURLY@[28; 29) | 30 | R_CURLY@[28; 29) "}" |
31 | WHITESPACE@[29; 30) | 31 | WHITESPACE@[29; 30) "\n" |
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt b/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt index e65d9c9e1..1af31c48b 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0008_pub_expr.txt | |||
@@ -1,25 +1,25 @@ | |||
1 | SOURCE_FILE@[0; 21) | 1 | SOURCE_FILE@[0; 21) |
2 | FN_DEF@[0; 20) | 2 | FN_DEF@[0; 20) |
3 | FN_KW@[0; 2) | 3 | FN_KW@[0; 2) "fn" |
4 | WHITESPACE@[2; 3) | 4 | WHITESPACE@[2; 3) " " |
5 | NAME@[3; 6) | 5 | NAME@[3; 6) |
6 | IDENT@[3; 6) "foo" | 6 | IDENT@[3; 6) "foo" |
7 | PARAM_LIST@[6; 8) | 7 | PARAM_LIST@[6; 8) |
8 | L_PAREN@[6; 7) | 8 | L_PAREN@[6; 7) "(" |
9 | R_PAREN@[7; 8) | 9 | R_PAREN@[7; 8) ")" |
10 | WHITESPACE@[8; 9) | 10 | WHITESPACE@[8; 9) " " |
11 | BLOCK@[9; 20) | 11 | BLOCK@[9; 20) |
12 | L_CURLY@[9; 10) | 12 | L_CURLY@[9; 10) "{" |
13 | WHITESPACE@[10; 11) | 13 | WHITESPACE@[10; 11) " " |
14 | ERROR@[11; 14) | 14 | ERROR@[11; 14) |
15 | VISIBILITY@[11; 14) | 15 | VISIBILITY@[11; 14) |
16 | PUB_KW@[11; 14) | 16 | PUB_KW@[11; 14) "pub" |
17 | err: `expected an item` | 17 | err: `expected an item` |
18 | WHITESPACE@[14; 15) | 18 | WHITESPACE@[14; 15) " " |
19 | EXPR_STMT@[15; 18) | 19 | EXPR_STMT@[15; 18) |
20 | LITERAL@[15; 17) | 20 | LITERAL@[15; 17) |
21 | INT_NUMBER@[15; 17) "92" | 21 | INT_NUMBER@[15; 17) "92" |
22 | SEMI@[17; 18) | 22 | SEMI@[17; 18) ";" |
23 | WHITESPACE@[18; 19) | 23 | WHITESPACE@[18; 19) " " |
24 | R_CURLY@[19; 20) | 24 | R_CURLY@[19; 20) "}" |
25 | WHITESPACE@[20; 21) | 25 | WHITESPACE@[20; 21) "\n" |
diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt b/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt index fdea1ec1e..9d50a520f 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0009_attr_on_expr_not_allowed.txt | |||
@@ -1,55 +1,55 @@ | |||
1 | SOURCE_FILE@[0; 48) | 1 | SOURCE_FILE@[0; 48) |
2 | FN_DEF@[0; 47) | 2 | FN_DEF@[0; 47) |
3 | FN_KW@[0; 2) | 3 | FN_KW@[0; 2) "fn" |
4 | WHITESPACE@[2; 3) | 4 | WHITESPACE@[2; 3) " " |
5 | NAME@[3; 6) | 5 | NAME@[3; 6) |
6 | IDENT@[3; 6) "foo" | 6 | IDENT@[3; 6) "foo" |
7 | PARAM_LIST@[6; 8) | 7 | PARAM_LIST@[6; 8) |
8 | L_PAREN@[6; 7) | 8 | L_PAREN@[6; 7) "(" |
9 | R_PAREN@[7; 8) | 9 | R_PAREN@[7; 8) ")" |
10 | WHITESPACE@[8; 9) | 10 | WHITESPACE@[8; 9) " " |
11 | BLOCK@[9; 47) | 11 | BLOCK@[9; 47) |
12 | L_CURLY@[9; 10) | 12 | L_CURLY@[9; 10) "{" |
13 | WHITESPACE@[10; 14) | 13 | WHITESPACE@[10; 14) "\n " |
14 | EXPR_STMT@[14; 25) | 14 | EXPR_STMT@[14; 25) |
15 | ATTR@[14; 18) | 15 | ATTR@[14; 18) |
16 | POUND@[14; 15) | 16 | POUND@[14; 15) "#" |
17 | TOKEN_TREE@[15; 18) | 17 | TOKEN_TREE@[15; 18) |
18 | L_BRACK@[15; 16) | 18 | L_BRACK@[15; 16) "[" |
19 | IDENT@[16; 17) "A" | 19 | IDENT@[16; 17) "A" |
20 | R_BRACK@[17; 18) | 20 | R_BRACK@[17; 18) "]" |
21 | WHITESPACE@[18; 19) | 21 | WHITESPACE@[18; 19) " " |
22 | BIN_EXPR@[19; 24) | 22 | BIN_EXPR@[19; 24) |
23 | LITERAL@[19; 20) | 23 | LITERAL@[19; 20) |
24 | INT_NUMBER@[19; 20) "1" | 24 | INT_NUMBER@[19; 20) "1" |
25 | WHITESPACE@[20; 21) | 25 | WHITESPACE@[20; 21) " " |
26 | PLUS@[21; 22) | 26 | PLUS@[21; 22) "+" |
27 | WHITESPACE@[22; 23) | 27 | WHITESPACE@[22; 23) " " |
28 | LITERAL@[23; 24) | 28 | LITERAL@[23; 24) |
29 | INT_NUMBER@[23; 24) "2" | 29 | INT_NUMBER@[23; 24) "2" |
30 | err: `attributes are not allowed on BIN_EXPR` | 30 | err: `attributes are not allowed on BIN_EXPR` |
31 | SEMI@[24; 25) | 31 | SEMI@[24; 25) ";" |
32 | WHITESPACE@[25; 29) | 32 | WHITESPACE@[25; 29) "\n " |
33 | EXPR_STMT@[29; 45) | 33 | EXPR_STMT@[29; 45) |
34 | ATTR@[29; 33) | 34 | ATTR@[29; 33) |
35 | POUND@[29; 30) | 35 | POUND@[29; 30) "#" |
36 | TOKEN_TREE@[30; 33) | 36 | TOKEN_TREE@[30; 33) |
37 | L_BRACK@[30; 31) | 37 | L_BRACK@[30; 31) "[" |
38 | IDENT@[31; 32) "B" | 38 | IDENT@[31; 32) "B" |
39 | R_BRACK@[32; 33) | 39 | R_BRACK@[32; 33) "]" |
40 | WHITESPACE@[33; 34) | 40 | WHITESPACE@[33; 34) " " |
41 | IF_EXPR@[34; 44) | 41 | IF_EXPR@[34; 44) |
42 | IF_KW@[34; 36) | 42 | IF_KW@[34; 36) "if" |
43 | WHITESPACE@[36; 37) | 43 | WHITESPACE@[36; 37) " " |
44 | CONDITION@[37; 41) | 44 | CONDITION@[37; 41) |
45 | LITERAL@[37; 41) | 45 | LITERAL@[37; 41) |
46 | TRUE_KW@[37; 41) | 46 | TRUE_KW@[37; 41) "true" |
47 | WHITESPACE@[41; 42) | 47 | WHITESPACE@[41; 42) " " |
48 | BLOCK@[42; 44) | 48 | BLOCK@[42; 44) |
49 | L_CURLY@[42; 43) | 49 | L_CURLY@[42; 43) "{" |
50 | R_CURLY@[43; 44) | 50 | R_CURLY@[43; 44) "}" |
51 | err: `attributes are not allowed on IF_EXPR` | 51 | err: `attributes are not allowed on IF_EXPR` |
52 | SEMI@[44; 45) | 52 | SEMI@[44; 45) ";" |
53 | WHITESPACE@[45; 46) | 53 | WHITESPACE@[45; 46) "\n" |
54 | R_CURLY@[46; 47) | 54 | R_CURLY@[46; 47) "}" |
55 | WHITESPACE@[47; 48) | 55 | WHITESPACE@[47; 48) "\n" |