diff options
Diffstat (limited to 'crates/ra_syntax/test_data/parser/inline/ok')
13 files changed, 242 insertions, 192 deletions
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.txt b/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.txt index 56aeba768..731c31f76 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0054_record_field_attrs.txt | |||
@@ -11,18 +11,20 @@ SOURCE_FILE@[0; 64) | |||
11 | RECORD_FIELD_DEF@[15; 60) | 11 | RECORD_FIELD_DEF@[15; 60) |
12 | ATTR@[15; 43) | 12 | ATTR@[15; 43) |
13 | POUND@[15; 16) "#" | 13 | POUND@[15; 16) "#" |
14 | TOKEN_TREE@[16; 43) | 14 | L_BRACK@[16; 17) "[" |
15 | L_BRACK@[16; 17) "[" | 15 | PATH@[17; 22) |
16 | IDENT@[17; 22) "serde" | 16 | PATH_SEGMENT@[17; 22) |
17 | TOKEN_TREE@[22; 42) | 17 | NAME_REF@[17; 22) |
18 | L_PAREN@[22; 23) "(" | 18 | IDENT@[17; 22) "serde" |
19 | IDENT@[23; 27) "with" | 19 | TOKEN_TREE@[22; 42) |
20 | WHITESPACE@[27; 28) " " | 20 | L_PAREN@[22; 23) "(" |
21 | EQ@[28; 29) "=" | 21 | IDENT@[23; 27) "with" |
22 | WHITESPACE@[29; 30) " " | 22 | WHITESPACE@[27; 28) " " |
23 | STRING@[30; 41) "\"url_serde\"" | 23 | EQ@[28; 29) "=" |
24 | R_PAREN@[41; 42) ")" | 24 | WHITESPACE@[29; 30) " " |
25 | R_BRACK@[42; 43) "]" | 25 | STRING@[30; 41) "\"url_serde\"" |
26 | R_PAREN@[41; 42) ")" | ||
27 | R_BRACK@[42; 43) "]" | ||
26 | WHITESPACE@[43; 48) "\n " | 28 | WHITESPACE@[43; 48) "\n " |
27 | VISIBILITY@[48; 51) | 29 | VISIBILITY@[48; 51) |
28 | PUB_KW@[48; 51) "pub" | 30 | PUB_KW@[48; 51) "pub" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.txt b/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.txt index cb6d9f76d..8fe15d8e2 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0115_tuple_field_attrs.txt | |||
@@ -11,18 +11,20 @@ SOURCE_FILE@[0; 60) | |||
11 | TUPLE_FIELD_DEF@[15; 55) | 11 | TUPLE_FIELD_DEF@[15; 55) |
12 | ATTR@[15; 43) | 12 | ATTR@[15; 43) |
13 | POUND@[15; 16) "#" | 13 | POUND@[15; 16) "#" |
14 | TOKEN_TREE@[16; 43) | 14 | L_BRACK@[16; 17) "[" |
15 | L_BRACK@[16; 17) "[" | 15 | PATH@[17; 22) |
16 | IDENT@[17; 22) "serde" | 16 | PATH_SEGMENT@[17; 22) |
17 | TOKEN_TREE@[22; 42) | 17 | NAME_REF@[17; 22) |
18 | L_PAREN@[22; 23) "(" | 18 | IDENT@[17; 22) "serde" |
19 | IDENT@[23; 27) "with" | 19 | TOKEN_TREE@[22; 42) |
20 | WHITESPACE@[27; 28) " " | 20 | L_PAREN@[22; 23) "(" |
21 | EQ@[28; 29) "=" | 21 | IDENT@[23; 27) "with" |
22 | WHITESPACE@[29; 30) " " | 22 | WHITESPACE@[27; 28) " " |
23 | STRING@[30; 41) "\"url_serde\"" | 23 | EQ@[28; 29) "=" |
24 | R_PAREN@[41; 42) ")" | 24 | WHITESPACE@[29; 30) " " |
25 | R_BRACK@[42; 43) "]" | 25 | STRING@[30; 41) "\"url_serde\"" |
26 | R_PAREN@[41; 42) ")" | ||
27 | R_BRACK@[42; 43) "]" | ||
26 | WHITESPACE@[43; 48) "\n " | 28 | WHITESPACE@[43; 48) "\n " |
27 | VISIBILITY@[48; 51) | 29 | VISIBILITY@[48; 51) |
28 | PUB_KW@[48; 51) "pub" | 30 | PUB_KW@[48; 51) "pub" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.txt b/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.txt index 0ef3eeb75..0e9e9b95b 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.txt | |||
@@ -25,14 +25,16 @@ SOURCE_FILE@[0; 94) | |||
25 | ATTR@[54; 91) | 25 | ATTR@[54; 91) |
26 | POUND@[54; 55) "#" | 26 | POUND@[54; 55) "#" |
27 | EXCL@[55; 56) "!" | 27 | EXCL@[55; 56) "!" |
28 | TOKEN_TREE@[56; 91) | 28 | L_BRACK@[56; 57) "[" |
29 | L_BRACK@[56; 57) "[" | 29 | PATH@[57; 60) |
30 | IDENT@[57; 60) "doc" | 30 | PATH_SEGMENT@[57; 60) |
31 | TOKEN_TREE@[60; 90) | 31 | NAME_REF@[57; 60) |
32 | L_PAREN@[60; 61) "(" | 32 | IDENT@[57; 60) "doc" |
33 | STRING@[61; 89) "\"This is also a doc c ..." | 33 | TOKEN_TREE@[60; 90) |
34 | R_PAREN@[89; 90) ")" | 34 | L_PAREN@[60; 61) "(" |
35 | R_BRACK@[90; 91) "]" | 35 | STRING@[61; 89) "\"This is also a doc c ..." |
36 | R_PAREN@[89; 90) ")" | ||
37 | R_BRACK@[90; 91) "]" | ||
36 | WHITESPACE@[91; 92) "\n" | 38 | WHITESPACE@[91; 92) "\n" |
37 | R_CURLY@[92; 93) "}" | 39 | R_CURLY@[92; 93) "}" |
38 | WHITESPACE@[93; 94) "\n" | 40 | WHITESPACE@[93; 94) "\n" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.txt b/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.txt index 3bbeb62bc..640e0640f 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0120_match_arms_inner_attribute.txt | |||
@@ -25,38 +25,44 @@ SOURCE_FILE@[0; 139) | |||
25 | ATTR@[34; 60) | 25 | ATTR@[34; 60) |
26 | POUND@[34; 35) "#" | 26 | POUND@[34; 35) "#" |
27 | EXCL@[35; 36) "!" | 27 | EXCL@[35; 36) "!" |
28 | TOKEN_TREE@[36; 60) | 28 | L_BRACK@[36; 37) "[" |
29 | L_BRACK@[36; 37) "[" | 29 | PATH@[37; 40) |
30 | IDENT@[37; 40) "doc" | 30 | PATH_SEGMENT@[37; 40) |
31 | TOKEN_TREE@[40; 59) | 31 | NAME_REF@[37; 40) |
32 | L_PAREN@[40; 41) "(" | 32 | IDENT@[37; 40) "doc" |
33 | STRING@[41; 58) "\"Inner attribute\"" | 33 | TOKEN_TREE@[40; 59) |
34 | R_PAREN@[58; 59) ")" | 34 | L_PAREN@[40; 41) "(" |
35 | R_BRACK@[59; 60) "]" | 35 | STRING@[41; 58) "\"Inner attribute\"" |
36 | R_PAREN@[58; 59) ")" | ||
37 | R_BRACK@[59; 60) "]" | ||
36 | WHITESPACE@[60; 69) "\n " | 38 | WHITESPACE@[60; 69) "\n " |
37 | ATTR@[69; 86) | 39 | ATTR@[69; 86) |
38 | POUND@[69; 70) "#" | 40 | POUND@[69; 70) "#" |
39 | EXCL@[70; 71) "!" | 41 | EXCL@[70; 71) "!" |
40 | TOKEN_TREE@[71; 86) | 42 | L_BRACK@[71; 72) "[" |
41 | L_BRACK@[71; 72) "[" | 43 | PATH@[72; 75) |
42 | IDENT@[72; 75) "doc" | 44 | PATH_SEGMENT@[72; 75) |
43 | TOKEN_TREE@[75; 85) | 45 | NAME_REF@[72; 75) |
44 | L_PAREN@[75; 76) "(" | 46 | IDENT@[72; 75) "doc" |
45 | STRING@[76; 84) "\"Can be\"" | 47 | TOKEN_TREE@[75; 85) |
46 | R_PAREN@[84; 85) ")" | 48 | L_PAREN@[75; 76) "(" |
47 | R_BRACK@[85; 86) "]" | 49 | STRING@[76; 84) "\"Can be\"" |
50 | R_PAREN@[84; 85) ")" | ||
51 | R_BRACK@[85; 86) "]" | ||
48 | WHITESPACE@[86; 95) "\n " | 52 | WHITESPACE@[86; 95) "\n " |
49 | ATTR@[95; 113) | 53 | ATTR@[95; 113) |
50 | POUND@[95; 96) "#" | 54 | POUND@[95; 96) "#" |
51 | EXCL@[96; 97) "!" | 55 | EXCL@[96; 97) "!" |
52 | TOKEN_TREE@[97; 113) | 56 | L_BRACK@[97; 98) "[" |
53 | L_BRACK@[97; 98) "[" | 57 | PATH@[98; 101) |
54 | IDENT@[98; 101) "doc" | 58 | PATH_SEGMENT@[98; 101) |
55 | TOKEN_TREE@[101; 112) | 59 | NAME_REF@[98; 101) |
56 | L_PAREN@[101; 102) "(" | 60 | IDENT@[98; 101) "doc" |
57 | STRING@[102; 111) "\"Stacked\"" | 61 | TOKEN_TREE@[101; 112) |
58 | R_PAREN@[111; 112) ")" | 62 | L_PAREN@[101; 102) "(" |
59 | R_BRACK@[112; 113) "]" | 63 | STRING@[102; 111) "\"Stacked\"" |
64 | R_PAREN@[111; 112) ")" | ||
65 | R_BRACK@[112; 113) "]" | ||
60 | WHITESPACE@[113; 122) "\n " | 66 | WHITESPACE@[113; 122) "\n " |
61 | MATCH_ARM@[122; 129) | 67 | MATCH_ARM@[122; 129) |
62 | PLACEHOLDER_PAT@[122; 123) | 68 | PLACEHOLDER_PAT@[122; 123) |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.txt b/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.txt index 5fd0adfc2..ff380b448 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0121_match_arms_outer_attributes.txt | |||
@@ -25,18 +25,20 @@ SOURCE_FILE@[0; 259) | |||
25 | MATCH_ARM@[34; 74) | 25 | MATCH_ARM@[34; 74) |
26 | ATTR@[34; 58) | 26 | ATTR@[34; 58) |
27 | POUND@[34; 35) "#" | 27 | POUND@[34; 35) "#" |
28 | TOKEN_TREE@[35; 58) | 28 | L_BRACK@[35; 36) "[" |
29 | L_BRACK@[35; 36) "[" | 29 | PATH@[36; 39) |
30 | IDENT@[36; 39) "cfg" | 30 | PATH_SEGMENT@[36; 39) |
31 | TOKEN_TREE@[39; 57) | 31 | NAME_REF@[36; 39) |
32 | L_PAREN@[39; 40) "(" | 32 | IDENT@[36; 39) "cfg" |
33 | IDENT@[40; 47) "feature" | 33 | TOKEN_TREE@[39; 57) |
34 | WHITESPACE@[47; 48) " " | 34 | L_PAREN@[39; 40) "(" |
35 | EQ@[48; 49) "=" | 35 | IDENT@[40; 47) "feature" |
36 | WHITESPACE@[49; 50) " " | 36 | WHITESPACE@[47; 48) " " |
37 | STRING@[50; 56) "\"some\"" | 37 | EQ@[48; 49) "=" |
38 | R_PAREN@[56; 57) ")" | 38 | WHITESPACE@[49; 50) " " |
39 | R_BRACK@[57; 58) "]" | 39 | STRING@[50; 56) "\"some\"" |
40 | R_PAREN@[56; 57) ")" | ||
41 | R_BRACK@[57; 58) "]" | ||
40 | WHITESPACE@[58; 67) "\n " | 42 | WHITESPACE@[58; 67) "\n " |
41 | PLACEHOLDER_PAT@[67; 68) | 43 | PLACEHOLDER_PAT@[67; 68) |
42 | UNDERSCORE@[67; 68) "_" | 44 | UNDERSCORE@[67; 68) "_" |
@@ -51,18 +53,20 @@ SOURCE_FILE@[0; 259) | |||
51 | MATCH_ARM@[84; 125) | 53 | MATCH_ARM@[84; 125) |
52 | ATTR@[84; 109) | 54 | ATTR@[84; 109) |
53 | POUND@[84; 85) "#" | 55 | POUND@[84; 85) "#" |
54 | TOKEN_TREE@[85; 109) | 56 | L_BRACK@[85; 86) "[" |
55 | L_BRACK@[85; 86) "[" | 57 | PATH@[86; 89) |
56 | IDENT@[86; 89) "cfg" | 58 | PATH_SEGMENT@[86; 89) |
57 | TOKEN_TREE@[89; 108) | 59 | NAME_REF@[86; 89) |
58 | L_PAREN@[89; 90) "(" | 60 | IDENT@[86; 89) "cfg" |
59 | IDENT@[90; 97) "feature" | 61 | TOKEN_TREE@[89; 108) |
60 | WHITESPACE@[97; 98) " " | 62 | L_PAREN@[89; 90) "(" |
61 | EQ@[98; 99) "=" | 63 | IDENT@[90; 97) "feature" |
62 | WHITESPACE@[99; 100) " " | 64 | WHITESPACE@[97; 98) " " |
63 | STRING@[100; 107) "\"other\"" | 65 | EQ@[98; 99) "=" |
64 | R_PAREN@[107; 108) ")" | 66 | WHITESPACE@[99; 100) " " |
65 | R_BRACK@[108; 109) "]" | 67 | STRING@[100; 107) "\"other\"" |
68 | R_PAREN@[107; 108) ")" | ||
69 | R_BRACK@[108; 109) "]" | ||
66 | WHITESPACE@[109; 118) "\n " | 70 | WHITESPACE@[109; 118) "\n " |
67 | PLACEHOLDER_PAT@[118; 119) | 71 | PLACEHOLDER_PAT@[118; 119) |
68 | UNDERSCORE@[118; 119) "_" | 72 | UNDERSCORE@[118; 119) "_" |
@@ -77,48 +81,54 @@ SOURCE_FILE@[0; 259) | |||
77 | MATCH_ARM@[135; 249) | 81 | MATCH_ARM@[135; 249) |
78 | ATTR@[135; 159) | 82 | ATTR@[135; 159) |
79 | POUND@[135; 136) "#" | 83 | POUND@[135; 136) "#" |
80 | TOKEN_TREE@[136; 159) | 84 | L_BRACK@[136; 137) "[" |
81 | L_BRACK@[136; 137) "[" | 85 | PATH@[137; 140) |
82 | IDENT@[137; 140) "cfg" | 86 | PATH_SEGMENT@[137; 140) |
83 | TOKEN_TREE@[140; 158) | 87 | NAME_REF@[137; 140) |
84 | L_PAREN@[140; 141) "(" | 88 | IDENT@[137; 140) "cfg" |
85 | IDENT@[141; 148) "feature" | 89 | TOKEN_TREE@[140; 158) |
86 | WHITESPACE@[148; 149) " " | 90 | L_PAREN@[140; 141) "(" |
87 | EQ@[149; 150) "=" | 91 | IDENT@[141; 148) "feature" |
88 | WHITESPACE@[150; 151) " " | 92 | WHITESPACE@[148; 149) " " |
89 | STRING@[151; 157) "\"many\"" | 93 | EQ@[149; 150) "=" |
90 | R_PAREN@[157; 158) ")" | 94 | WHITESPACE@[150; 151) " " |
91 | R_BRACK@[158; 159) "]" | 95 | STRING@[151; 157) "\"many\"" |
96 | R_PAREN@[157; 158) ")" | ||
97 | R_BRACK@[158; 159) "]" | ||
92 | WHITESPACE@[159; 168) "\n " | 98 | WHITESPACE@[159; 168) "\n " |
93 | ATTR@[168; 198) | 99 | ATTR@[168; 198) |
94 | POUND@[168; 169) "#" | 100 | POUND@[168; 169) "#" |
95 | TOKEN_TREE@[169; 198) | 101 | L_BRACK@[169; 170) "[" |
96 | L_BRACK@[169; 170) "[" | 102 | PATH@[170; 173) |
97 | IDENT@[170; 173) "cfg" | 103 | PATH_SEGMENT@[170; 173) |
98 | TOKEN_TREE@[173; 197) | 104 | NAME_REF@[170; 173) |
99 | L_PAREN@[173; 174) "(" | 105 | IDENT@[170; 173) "cfg" |
100 | IDENT@[174; 181) "feature" | 106 | TOKEN_TREE@[173; 197) |
101 | WHITESPACE@[181; 182) " " | 107 | L_PAREN@[173; 174) "(" |
102 | EQ@[182; 183) "=" | 108 | IDENT@[174; 181) "feature" |
103 | WHITESPACE@[183; 184) " " | 109 | WHITESPACE@[181; 182) " " |
104 | STRING@[184; 196) "\"attributes\"" | 110 | EQ@[182; 183) "=" |
105 | R_PAREN@[196; 197) ")" | 111 | WHITESPACE@[183; 184) " " |
106 | R_BRACK@[197; 198) "]" | 112 | STRING@[184; 196) "\"attributes\"" |
113 | R_PAREN@[196; 197) ")" | ||
114 | R_BRACK@[197; 198) "]" | ||
107 | WHITESPACE@[198; 207) "\n " | 115 | WHITESPACE@[198; 207) "\n " |
108 | ATTR@[207; 233) | 116 | ATTR@[207; 233) |
109 | POUND@[207; 208) "#" | 117 | POUND@[207; 208) "#" |
110 | TOKEN_TREE@[208; 233) | 118 | L_BRACK@[208; 209) "[" |
111 | L_BRACK@[208; 209) "[" | 119 | PATH@[209; 212) |
112 | IDENT@[209; 212) "cfg" | 120 | PATH_SEGMENT@[209; 212) |
113 | TOKEN_TREE@[212; 232) | 121 | NAME_REF@[209; 212) |
114 | L_PAREN@[212; 213) "(" | 122 | IDENT@[209; 212) "cfg" |
115 | IDENT@[213; 220) "feature" | 123 | TOKEN_TREE@[212; 232) |
116 | WHITESPACE@[220; 221) " " | 124 | L_PAREN@[212; 213) "(" |
117 | EQ@[221; 222) "=" | 125 | IDENT@[213; 220) "feature" |
118 | WHITESPACE@[222; 223) " " | 126 | WHITESPACE@[220; 221) " " |
119 | STRING@[223; 231) "\"before\"" | 127 | EQ@[221; 222) "=" |
120 | R_PAREN@[231; 232) ")" | 128 | WHITESPACE@[222; 223) " " |
121 | R_BRACK@[232; 233) "]" | 129 | STRING@[223; 231) "\"before\"" |
130 | R_PAREN@[231; 232) ")" | ||
131 | R_BRACK@[232; 233) "]" | ||
122 | WHITESPACE@[233; 242) "\n " | 132 | WHITESPACE@[233; 242) "\n " |
123 | PLACEHOLDER_PAT@[242; 243) | 133 | PLACEHOLDER_PAT@[242; 243) |
124 | UNDERSCORE@[242; 243) "_" | 134 | UNDERSCORE@[242; 243) "_" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.txt b/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.txt index bc7b68b90..a73ff9c90 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.txt | |||
@@ -9,14 +9,16 @@ SOURCE_FILE@[0; 64) | |||
9 | LIFETIME_PARAM@[7; 29) | 9 | LIFETIME_PARAM@[7; 29) |
10 | ATTR@[7; 26) | 10 | ATTR@[7; 26) |
11 | POUND@[7; 8) "#" | 11 | POUND@[7; 8) "#" |
12 | TOKEN_TREE@[8; 26) | 12 | L_BRACK@[8; 9) "[" |
13 | L_BRACK@[8; 9) "[" | 13 | PATH@[9; 15) |
14 | IDENT@[9; 15) "derive" | 14 | PATH_SEGMENT@[9; 15) |
15 | TOKEN_TREE@[15; 25) | 15 | NAME_REF@[9; 15) |
16 | L_PAREN@[15; 16) "(" | 16 | IDENT@[9; 15) "derive" |
17 | IDENT@[16; 24) "Lifetime" | 17 | TOKEN_TREE@[15; 25) |
18 | R_PAREN@[24; 25) ")" | 18 | L_PAREN@[15; 16) "(" |
19 | R_BRACK@[25; 26) "]" | 19 | IDENT@[16; 24) "Lifetime" |
20 | R_PAREN@[24; 25) ")" | ||
21 | R_BRACK@[25; 26) "]" | ||
20 | WHITESPACE@[26; 27) " " | 22 | WHITESPACE@[26; 27) " " |
21 | LIFETIME@[27; 29) "\'a" | 23 | LIFETIME@[27; 29) "\'a" |
22 | COMMA@[29; 30) "," | 24 | COMMA@[29; 30) "," |
@@ -24,14 +26,16 @@ SOURCE_FILE@[0; 64) | |||
24 | TYPE_PARAM@[31; 48) | 26 | TYPE_PARAM@[31; 48) |
25 | ATTR@[31; 46) | 27 | ATTR@[31; 46) |
26 | POUND@[31; 32) "#" | 28 | POUND@[31; 32) "#" |
27 | TOKEN_TREE@[32; 46) | 29 | L_BRACK@[32; 33) "[" |
28 | L_BRACK@[32; 33) "[" | 30 | PATH@[33; 39) |
29 | IDENT@[33; 39) "derive" | 31 | PATH_SEGMENT@[33; 39) |
30 | TOKEN_TREE@[39; 45) | 32 | NAME_REF@[33; 39) |
31 | L_PAREN@[39; 40) "(" | 33 | IDENT@[33; 39) "derive" |
32 | IDENT@[40; 44) "Type" | 34 | TOKEN_TREE@[39; 45) |
33 | R_PAREN@[44; 45) ")" | 35 | L_PAREN@[39; 40) "(" |
34 | R_BRACK@[45; 46) "]" | 36 | IDENT@[40; 44) "Type" |
37 | R_PAREN@[44; 45) ")" | ||
38 | R_BRACK@[45; 46) "]" | ||
35 | WHITESPACE@[46; 47) " " | 39 | WHITESPACE@[46; 47) " " |
36 | NAME@[47; 48) | 40 | NAME@[47; 48) |
37 | IDENT@[47; 48) "T" | 41 | IDENT@[47; 48) "T" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.txt index 37cc438d9..a36c3df0e 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.txt | |||
@@ -24,14 +24,16 @@ SOURCE_FILE@[0; 46) | |||
24 | RECORD_FIELD@[20; 41) | 24 | RECORD_FIELD@[20; 41) |
25 | ATTR@[20; 32) | 25 | ATTR@[20; 32) |
26 | POUND@[20; 21) "#" | 26 | POUND@[20; 21) "#" |
27 | TOKEN_TREE@[21; 32) | 27 | L_BRACK@[21; 22) "[" |
28 | L_BRACK@[21; 22) "[" | 28 | PATH@[22; 25) |
29 | IDENT@[22; 25) "cfg" | 29 | PATH_SEGMENT@[22; 25) |
30 | TOKEN_TREE@[25; 31) | 30 | NAME_REF@[22; 25) |
31 | L_PAREN@[25; 26) "(" | 31 | IDENT@[22; 25) "cfg" |
32 | IDENT@[26; 30) "test" | 32 | TOKEN_TREE@[25; 31) |
33 | R_PAREN@[30; 31) ")" | 33 | L_PAREN@[25; 26) "(" |
34 | R_BRACK@[31; 32) "]" | 34 | IDENT@[26; 30) "test" |
35 | R_PAREN@[30; 31) ")" | ||
36 | R_BRACK@[31; 32) "]" | ||
35 | WHITESPACE@[32; 33) " " | 37 | WHITESPACE@[32; 33) " " |
36 | NAME_REF@[33; 38) | 38 | NAME_REF@[33; 38) |
37 | IDENT@[33; 38) "field" | 39 | IDENT@[33; 38) "field" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.txt b/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.txt index 6bc0db077..5c311d18a 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0126_attr_on_expr_stmt.txt | |||
@@ -15,10 +15,12 @@ SOURCE_FILE@[0; 82) | |||
15 | EXPR_STMT@[15; 26) | 15 | EXPR_STMT@[15; 26) |
16 | ATTR@[15; 19) | 16 | ATTR@[15; 19) |
17 | POUND@[15; 16) "#" | 17 | POUND@[15; 16) "#" |
18 | TOKEN_TREE@[16; 19) | 18 | L_BRACK@[16; 17) "[" |
19 | L_BRACK@[16; 17) "[" | 19 | PATH@[17; 18) |
20 | IDENT@[17; 18) "A" | 20 | PATH_SEGMENT@[17; 18) |
21 | R_BRACK@[18; 19) "]" | 21 | NAME_REF@[17; 18) |
22 | IDENT@[17; 18) "A" | ||
23 | R_BRACK@[18; 19) "]" | ||
22 | WHITESPACE@[19; 20) " " | 24 | WHITESPACE@[19; 20) " " |
23 | CALL_EXPR@[20; 25) | 25 | CALL_EXPR@[20; 25) |
24 | PATH_EXPR@[20; 23) | 26 | PATH_EXPR@[20; 23) |
@@ -34,10 +36,12 @@ SOURCE_FILE@[0; 82) | |||
34 | EXPR_STMT@[31; 42) | 36 | EXPR_STMT@[31; 42) |
35 | ATTR@[31; 35) | 37 | ATTR@[31; 35) |
36 | POUND@[31; 32) "#" | 38 | POUND@[31; 32) "#" |
37 | TOKEN_TREE@[32; 35) | 39 | L_BRACK@[32; 33) "[" |
38 | L_BRACK@[32; 33) "[" | 40 | PATH@[33; 34) |
39 | IDENT@[33; 34) "B" | 41 | PATH_SEGMENT@[33; 34) |
40 | R_BRACK@[34; 35) "]" | 42 | NAME_REF@[33; 34) |
43 | IDENT@[33; 34) "B" | ||
44 | R_BRACK@[34; 35) "]" | ||
41 | WHITESPACE@[35; 36) " " | 45 | WHITESPACE@[35; 36) " " |
42 | MACRO_CALL@[36; 42) | 46 | MACRO_CALL@[36; 42) |
43 | PATH@[36; 39) | 47 | PATH@[36; 39) |
@@ -52,17 +56,21 @@ SOURCE_FILE@[0; 82) | |||
52 | EXPR_STMT@[47; 59) | 56 | EXPR_STMT@[47; 59) |
53 | ATTR@[47; 51) | 57 | ATTR@[47; 51) |
54 | POUND@[47; 48) "#" | 58 | POUND@[47; 48) "#" |
55 | TOKEN_TREE@[48; 51) | 59 | L_BRACK@[48; 49) "[" |
56 | L_BRACK@[48; 49) "[" | 60 | PATH@[49; 50) |
57 | IDENT@[49; 50) "C" | 61 | PATH_SEGMENT@[49; 50) |
58 | R_BRACK@[50; 51) "]" | 62 | NAME_REF@[49; 50) |
63 | IDENT@[49; 50) "C" | ||
64 | R_BRACK@[50; 51) "]" | ||
59 | WHITESPACE@[51; 52) " " | 65 | WHITESPACE@[51; 52) " " |
60 | ATTR@[52; 56) | 66 | ATTR@[52; 56) |
61 | POUND@[52; 53) "#" | 67 | POUND@[52; 53) "#" |
62 | TOKEN_TREE@[53; 56) | 68 | L_BRACK@[53; 54) "[" |
63 | L_BRACK@[53; 54) "[" | 69 | PATH@[54; 55) |
64 | IDENT@[54; 55) "D" | 70 | PATH_SEGMENT@[54; 55) |
65 | R_BRACK@[55; 56) "]" | 71 | NAME_REF@[54; 55) |
72 | IDENT@[54; 55) "D" | ||
73 | R_BRACK@[55; 56) "]" | ||
66 | WHITESPACE@[56; 57) " " | 74 | WHITESPACE@[56; 57) " " |
67 | BLOCK_EXPR@[57; 59) | 75 | BLOCK_EXPR@[57; 59) |
68 | BLOCK@[57; 59) | 76 | BLOCK@[57; 59) |
@@ -72,10 +80,12 @@ SOURCE_FILE@[0; 82) | |||
72 | EXPR_STMT@[64; 79) | 80 | EXPR_STMT@[64; 79) |
73 | ATTR@[64; 68) | 81 | ATTR@[64; 68) |
74 | POUND@[64; 65) "#" | 82 | POUND@[64; 65) "#" |
75 | TOKEN_TREE@[65; 68) | 83 | L_BRACK@[65; 66) "[" |
76 | L_BRACK@[65; 66) "[" | 84 | PATH@[66; 67) |
77 | IDENT@[66; 67) "D" | 85 | PATH_SEGMENT@[66; 67) |
78 | R_BRACK@[67; 68) "]" | 86 | NAME_REF@[66; 67) |
87 | IDENT@[66; 67) "D" | ||
88 | R_BRACK@[67; 68) "]" | ||
79 | WHITESPACE@[68; 69) " " | 89 | WHITESPACE@[68; 69) " " |
80 | RETURN_EXPR@[69; 78) | 90 | RETURN_EXPR@[69; 78) |
81 | RETURN_KW@[69; 75) "return" | 91 | RETURN_KW@[69; 75) "return" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.txt b/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.txt index c201196ec..21f49690a 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0127_attr_on_last_expr_in_block.txt | |||
@@ -20,10 +20,12 @@ SOURCE_FILE@[0; 47) | |||
20 | TRY_EXPR@[17; 29) | 20 | TRY_EXPR@[17; 29) |
21 | ATTR@[17; 21) | 21 | ATTR@[17; 21) |
22 | POUND@[17; 18) "#" | 22 | POUND@[17; 18) "#" |
23 | TOKEN_TREE@[18; 21) | 23 | L_BRACK@[18; 19) "[" |
24 | L_BRACK@[18; 19) "[" | 24 | PATH@[19; 20) |
25 | IDENT@[19; 20) "A" | 25 | PATH_SEGMENT@[19; 20) |
26 | R_BRACK@[20; 21) "]" | 26 | NAME_REF@[19; 20) |
27 | IDENT@[19; 20) "A" | ||
28 | R_BRACK@[20; 21) "]" | ||
27 | WHITESPACE@[21; 22) " " | 29 | WHITESPACE@[21; 22) " " |
28 | MACRO_CALL@[22; 28) | 30 | MACRO_CALL@[22; 28) |
29 | PATH@[22; 25) | 31 | PATH@[22; 25) |
@@ -41,10 +43,12 @@ SOURCE_FILE@[0; 47) | |||
41 | REF_EXPR@[36; 44) | 43 | REF_EXPR@[36; 44) |
42 | ATTR@[36; 40) | 44 | ATTR@[36; 40) |
43 | POUND@[36; 37) "#" | 45 | POUND@[36; 37) "#" |
44 | TOKEN_TREE@[37; 40) | 46 | L_BRACK@[37; 38) "[" |
45 | L_BRACK@[37; 38) "[" | 47 | PATH@[38; 39) |
46 | IDENT@[38; 39) "B" | 48 | PATH_SEGMENT@[38; 39) |
47 | R_BRACK@[39; 40) "]" | 49 | NAME_REF@[38; 39) |
50 | IDENT@[38; 39) "B" | ||
51 | R_BRACK@[39; 40) "]" | ||
48 | WHITESPACE@[40; 41) " " | 52 | WHITESPACE@[40; 41) " " |
49 | AMP@[41; 42) "&" | 53 | AMP@[41; 42) "&" |
50 | TUPLE_EXPR@[42; 44) | 54 | TUPLE_EXPR@[42; 44) |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.txt b/crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.txt index eac4f6f30..8f2e91bdf 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.txt | |||
@@ -29,14 +29,16 @@ SOURCE_FILE@[0; 56) | |||
29 | WHITESPACE@[24; 28) "\n " | 29 | WHITESPACE@[24; 28) "\n " |
30 | ATTR@[28; 40) | 30 | ATTR@[28; 40) |
31 | POUND@[28; 29) "#" | 31 | POUND@[28; 29) "#" |
32 | TOKEN_TREE@[29; 40) | 32 | L_BRACK@[29; 30) "[" |
33 | L_BRACK@[29; 30) "[" | 33 | PATH@[30; 33) |
34 | IDENT@[30; 33) "cfg" | 34 | PATH_SEGMENT@[30; 33) |
35 | TOKEN_TREE@[33; 39) | 35 | NAME_REF@[30; 33) |
36 | L_PAREN@[33; 34) "(" | 36 | IDENT@[30; 33) "cfg" |
37 | IDENT@[34; 38) "test" | 37 | TOKEN_TREE@[33; 39) |
38 | R_PAREN@[38; 39) ")" | 38 | L_PAREN@[33; 34) "(" |
39 | R_BRACK@[39; 40) "]" | 39 | IDENT@[34; 38) "test" |
40 | R_PAREN@[38; 39) ")" | ||
41 | R_BRACK@[39; 40) "]" | ||
40 | WHITESPACE@[40; 44) "\n " | 42 | WHITESPACE@[40; 44) "\n " |
41 | LITERAL@[44; 45) | 43 | LITERAL@[44; 45) |
42 | INT_NUMBER@[44; 45) "1" | 44 | INT_NUMBER@[44; 45) "1" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.txt b/crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.txt index 6fa1b42d9..41914eb8e 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.txt | |||
@@ -33,14 +33,16 @@ SOURCE_FILE@[0; 56) | |||
33 | WHITESPACE@[30; 34) "\n " | 33 | WHITESPACE@[30; 34) "\n " |
34 | ATTR@[34; 46) | 34 | ATTR@[34; 46) |
35 | POUND@[34; 35) "#" | 35 | POUND@[34; 35) "#" |
36 | TOKEN_TREE@[35; 46) | 36 | L_BRACK@[35; 36) "[" |
37 | L_BRACK@[35; 36) "[" | 37 | PATH@[36; 39) |
38 | IDENT@[36; 39) "cfg" | 38 | PATH_SEGMENT@[36; 39) |
39 | TOKEN_TREE@[39; 45) | 39 | NAME_REF@[36; 39) |
40 | L_PAREN@[39; 40) "(" | 40 | IDENT@[36; 39) "cfg" |
41 | IDENT@[40; 44) "test" | 41 | TOKEN_TREE@[39; 45) |
42 | R_PAREN@[44; 45) ")" | 42 | L_PAREN@[39; 40) "(" |
43 | R_BRACK@[45; 46) "]" | 43 | IDENT@[40; 44) "test" |
44 | R_PAREN@[44; 45) ")" | ||
45 | R_BRACK@[45; 46) "]" | ||
44 | WHITESPACE@[46; 50) "\n " | 46 | WHITESPACE@[46; 50) "\n " |
45 | LITERAL@[50; 51) | 47 | LITERAL@[50; 51) |
46 | INT_NUMBER@[50; 51) "2" | 48 | INT_NUMBER@[50; 51) "2" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.txt b/crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.txt index 708fa4773..e627b9746 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0138_self_param_outer_attr.txt | |||
@@ -8,10 +8,12 @@ SOURCE_FILE@[0; 26) | |||
8 | L_PAREN@[4; 5) "(" | 8 | L_PAREN@[4; 5) "(" |
9 | ATTR@[5; 16) | 9 | ATTR@[5; 16) |
10 | POUND@[5; 6) "#" | 10 | POUND@[5; 6) "#" |
11 | TOKEN_TREE@[6; 16) | 11 | L_BRACK@[6; 7) "[" |
12 | L_BRACK@[6; 7) "[" | 12 | PATH@[7; 15) |
13 | IDENT@[7; 15) "must_use" | 13 | PATH_SEGMENT@[7; 15) |
14 | R_BRACK@[15; 16) "]" | 14 | NAME_REF@[7; 15) |
15 | IDENT@[7; 15) "must_use" | ||
16 | R_BRACK@[15; 16) "]" | ||
15 | WHITESPACE@[16; 17) " " | 17 | WHITESPACE@[16; 17) " " |
16 | SELF_PARAM@[17; 21) | 18 | SELF_PARAM@[17; 21) |
17 | SELF_KW@[17; 21) "self" | 19 | SELF_KW@[17; 21) "self" |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.txt b/crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.txt index 9c0a0d20b..cf202c94b 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0139_param_outer_arg.txt | |||
@@ -8,10 +8,12 @@ SOURCE_FILE@[0; 28) | |||
8 | L_PAREN@[4; 5) "(" | 8 | L_PAREN@[4; 5) "(" |
9 | ATTR@[5; 13) | 9 | ATTR@[5; 13) |
10 | POUND@[5; 6) "#" | 10 | POUND@[5; 6) "#" |
11 | TOKEN_TREE@[6; 13) | 11 | L_BRACK@[6; 7) "[" |
12 | L_BRACK@[6; 7) "[" | 12 | PATH@[7; 12) |
13 | IDENT@[7; 12) "attr1" | 13 | PATH_SEGMENT@[7; 12) |
14 | R_BRACK@[12; 13) "]" | 14 | NAME_REF@[7; 12) |
15 | IDENT@[7; 12) "attr1" | ||
16 | R_BRACK@[12; 13) "]" | ||
15 | WHITESPACE@[13; 14) " " | 17 | WHITESPACE@[13; 14) " " |
16 | PARAM@[14; 23) | 18 | PARAM@[14; 23) |
17 | BIND_PAT@[14; 17) | 19 | BIND_PAT@[14; 17) |