diff options
author | Aleksey Kladov <[email protected]> | 2019-07-24 10:38:21 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-24 10:49:19 +0100 |
commit | 459241f272748ff2e57b2c7e84f5a04f78d67edb (patch) | |
tree | 2353f8f068962313d0b2748aab58b71c4ca456d2 /crates/ra_syntax/test_data/parser/inline/ok/0030_cond.txt | |
parent | 4d544fbf9b664b6a29d358d3cb41cdd7cd15e4d6 (diff) |
move syntax tests to unit tests
Diffstat (limited to 'crates/ra_syntax/test_data/parser/inline/ok/0030_cond.txt')
-rw-r--r-- | crates/ra_syntax/test_data/parser/inline/ok/0030_cond.txt | 200 |
1 files changed, 200 insertions, 0 deletions
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.txt b/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.txt new file mode 100644 index 000000000..1c9414b21 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0030_cond.txt | |||
@@ -0,0 +1,200 @@ | |||
1 | SOURCE_FILE@[0; 197) | ||
2 | FN_DEF@[0; 37) | ||
3 | FN_KW@[0; 2) "fn" | ||
4 | WHITESPACE@[2; 3) " " | ||
5 | NAME@[3; 6) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 8) | ||
8 | L_PAREN@[6; 7) "(" | ||
9 | R_PAREN@[7; 8) ")" | ||
10 | WHITESPACE@[8; 9) " " | ||
11 | BLOCK@[9; 37) | ||
12 | L_CURLY@[9; 10) "{" | ||
13 | WHITESPACE@[10; 11) " " | ||
14 | IF_EXPR@[11; 35) | ||
15 | IF_KW@[11; 13) "if" | ||
16 | WHITESPACE@[13; 14) " " | ||
17 | CONDITION@[14; 32) | ||
18 | LET_KW@[14; 17) "let" | ||
19 | WHITESPACE@[17; 18) " " | ||
20 | TUPLE_STRUCT_PAT@[18; 25) | ||
21 | PATH@[18; 22) | ||
22 | PATH_SEGMENT@[18; 22) | ||
23 | NAME_REF@[18; 22) | ||
24 | IDENT@[18; 22) "Some" | ||
25 | L_PAREN@[22; 23) "(" | ||
26 | PLACEHOLDER_PAT@[23; 24) | ||
27 | UNDERSCORE@[23; 24) "_" | ||
28 | R_PAREN@[24; 25) ")" | ||
29 | WHITESPACE@[25; 26) " " | ||
30 | EQ@[26; 27) "=" | ||
31 | WHITESPACE@[27; 28) " " | ||
32 | PATH_EXPR@[28; 32) | ||
33 | PATH@[28; 32) | ||
34 | PATH_SEGMENT@[28; 32) | ||
35 | NAME_REF@[28; 32) | ||
36 | IDENT@[28; 32) "None" | ||
37 | WHITESPACE@[32; 33) " " | ||
38 | BLOCK@[33; 35) | ||
39 | L_CURLY@[33; 34) "{" | ||
40 | R_CURLY@[34; 35) "}" | ||
41 | WHITESPACE@[35; 36) " " | ||
42 | R_CURLY@[36; 37) "}" | ||
43 | WHITESPACE@[37; 38) "\n" | ||
44 | FN_DEF@[38; 196) | ||
45 | FN_KW@[38; 40) "fn" | ||
46 | WHITESPACE@[40; 41) " " | ||
47 | NAME@[41; 44) | ||
48 | IDENT@[41; 44) "bar" | ||
49 | PARAM_LIST@[44; 46) | ||
50 | L_PAREN@[44; 45) "(" | ||
51 | R_PAREN@[45; 46) ")" | ||
52 | WHITESPACE@[46; 47) " " | ||
53 | BLOCK@[47; 196) | ||
54 | L_CURLY@[47; 48) "{" | ||
55 | WHITESPACE@[48; 53) "\n " | ||
56 | EXPR_STMT@[53; 87) | ||
57 | IF_EXPR@[53; 87) | ||
58 | IF_KW@[53; 55) "if" | ||
59 | WHITESPACE@[55; 56) " " | ||
60 | CONDITION@[56; 84) | ||
61 | LET_KW@[56; 59) "let" | ||
62 | WHITESPACE@[59; 60) " " | ||
63 | TUPLE_STRUCT_PAT@[60; 67) | ||
64 | PATH@[60; 64) | ||
65 | PATH_SEGMENT@[60; 64) | ||
66 | NAME_REF@[60; 64) | ||
67 | IDENT@[60; 64) "Some" | ||
68 | L_PAREN@[64; 65) "(" | ||
69 | PLACEHOLDER_PAT@[65; 66) | ||
70 | UNDERSCORE@[65; 66) "_" | ||
71 | R_PAREN@[66; 67) ")" | ||
72 | WHITESPACE@[67; 68) " " | ||
73 | PIPE@[68; 69) "|" | ||
74 | WHITESPACE@[69; 70) " " | ||
75 | TUPLE_STRUCT_PAT@[70; 77) | ||
76 | PATH@[70; 74) | ||
77 | PATH_SEGMENT@[70; 74) | ||
78 | NAME_REF@[70; 74) | ||
79 | IDENT@[70; 74) "Some" | ||
80 | L_PAREN@[74; 75) "(" | ||
81 | PLACEHOLDER_PAT@[75; 76) | ||
82 | UNDERSCORE@[75; 76) "_" | ||
83 | R_PAREN@[76; 77) ")" | ||
84 | WHITESPACE@[77; 78) " " | ||
85 | EQ@[78; 79) "=" | ||
86 | WHITESPACE@[79; 80) " " | ||
87 | PATH_EXPR@[80; 84) | ||
88 | PATH@[80; 84) | ||
89 | PATH_SEGMENT@[80; 84) | ||
90 | NAME_REF@[80; 84) | ||
91 | IDENT@[80; 84) "None" | ||
92 | WHITESPACE@[84; 85) " " | ||
93 | BLOCK@[85; 87) | ||
94 | L_CURLY@[85; 86) "{" | ||
95 | R_CURLY@[86; 87) "}" | ||
96 | WHITESPACE@[87; 92) "\n " | ||
97 | EXPR_STMT@[92; 118) | ||
98 | IF_EXPR@[92; 118) | ||
99 | IF_KW@[92; 94) "if" | ||
100 | WHITESPACE@[94; 95) " " | ||
101 | CONDITION@[95; 115) | ||
102 | LET_KW@[95; 98) "let" | ||
103 | WHITESPACE@[98; 99) " " | ||
104 | PIPE@[99; 100) "|" | ||
105 | WHITESPACE@[100; 101) " " | ||
106 | TUPLE_STRUCT_PAT@[101; 108) | ||
107 | PATH@[101; 105) | ||
108 | PATH_SEGMENT@[101; 105) | ||
109 | NAME_REF@[101; 105) | ||
110 | IDENT@[101; 105) "Some" | ||
111 | L_PAREN@[105; 106) "(" | ||
112 | PLACEHOLDER_PAT@[106; 107) | ||
113 | UNDERSCORE@[106; 107) "_" | ||
114 | R_PAREN@[107; 108) ")" | ||
115 | WHITESPACE@[108; 109) " " | ||
116 | EQ@[109; 110) "=" | ||
117 | WHITESPACE@[110; 111) " " | ||
118 | PATH_EXPR@[111; 115) | ||
119 | PATH@[111; 115) | ||
120 | PATH_SEGMENT@[111; 115) | ||
121 | NAME_REF@[111; 115) | ||
122 | IDENT@[111; 115) "None" | ||
123 | WHITESPACE@[115; 116) " " | ||
124 | BLOCK@[116; 118) | ||
125 | L_CURLY@[116; 117) "{" | ||
126 | R_CURLY@[117; 118) "}" | ||
127 | WHITESPACE@[118; 123) "\n " | ||
128 | EXPR_STMT@[123; 160) | ||
129 | WHILE_EXPR@[123; 160) | ||
130 | WHILE_KW@[123; 128) "while" | ||
131 | WHITESPACE@[128; 129) " " | ||
132 | CONDITION@[129; 157) | ||
133 | LET_KW@[129; 132) "let" | ||
134 | WHITESPACE@[132; 133) " " | ||
135 | TUPLE_STRUCT_PAT@[133; 140) | ||
136 | PATH@[133; 137) | ||
137 | PATH_SEGMENT@[133; 137) | ||
138 | NAME_REF@[133; 137) | ||
139 | IDENT@[133; 137) "Some" | ||
140 | L_PAREN@[137; 138) "(" | ||
141 | PLACEHOLDER_PAT@[138; 139) | ||
142 | UNDERSCORE@[138; 139) "_" | ||
143 | R_PAREN@[139; 140) ")" | ||
144 | WHITESPACE@[140; 141) " " | ||
145 | PIPE@[141; 142) "|" | ||
146 | WHITESPACE@[142; 143) " " | ||
147 | TUPLE_STRUCT_PAT@[143; 150) | ||
148 | PATH@[143; 147) | ||
149 | PATH_SEGMENT@[143; 147) | ||
150 | NAME_REF@[143; 147) | ||
151 | IDENT@[143; 147) "Some" | ||
152 | L_PAREN@[147; 148) "(" | ||
153 | PLACEHOLDER_PAT@[148; 149) | ||
154 | UNDERSCORE@[148; 149) "_" | ||
155 | R_PAREN@[149; 150) ")" | ||
156 | WHITESPACE@[150; 151) " " | ||
157 | EQ@[151; 152) "=" | ||
158 | WHITESPACE@[152; 153) " " | ||
159 | PATH_EXPR@[153; 157) | ||
160 | PATH@[153; 157) | ||
161 | PATH_SEGMENT@[153; 157) | ||
162 | NAME_REF@[153; 157) | ||
163 | IDENT@[153; 157) "None" | ||
164 | WHITESPACE@[157; 158) " " | ||
165 | BLOCK@[158; 160) | ||
166 | L_CURLY@[158; 159) "{" | ||
167 | R_CURLY@[159; 160) "}" | ||
168 | WHITESPACE@[160; 165) "\n " | ||
169 | WHILE_EXPR@[165; 194) | ||
170 | WHILE_KW@[165; 170) "while" | ||
171 | WHITESPACE@[170; 171) " " | ||
172 | CONDITION@[171; 191) | ||
173 | LET_KW@[171; 174) "let" | ||
174 | WHITESPACE@[174; 175) " " | ||
175 | PIPE@[175; 176) "|" | ||
176 | WHITESPACE@[176; 177) " " | ||
177 | TUPLE_STRUCT_PAT@[177; 184) | ||
178 | PATH@[177; 181) | ||
179 | PATH_SEGMENT@[177; 181) | ||
180 | NAME_REF@[177; 181) | ||
181 | IDENT@[177; 181) "Some" | ||
182 | L_PAREN@[181; 182) "(" | ||
183 | PLACEHOLDER_PAT@[182; 183) | ||
184 | UNDERSCORE@[182; 183) "_" | ||
185 | R_PAREN@[183; 184) ")" | ||
186 | WHITESPACE@[184; 185) " " | ||
187 | EQ@[185; 186) "=" | ||
188 | WHITESPACE@[186; 187) " " | ||
189 | PATH_EXPR@[187; 191) | ||
190 | PATH@[187; 191) | ||
191 | PATH_SEGMENT@[187; 191) | ||
192 | NAME_REF@[187; 191) | ||
193 | IDENT@[187; 191) "None" | ||
194 | WHITESPACE@[191; 192) " " | ||
195 | BLOCK@[192; 194) | ||
196 | L_CURLY@[192; 193) "{" | ||
197 | R_CURLY@[193; 194) "}" | ||
198 | WHITESPACE@[194; 195) "\n" | ||
199 | R_CURLY@[195; 196) "}" | ||
200 | WHITESPACE@[196; 197) "\n" | ||