File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,27 @@ fn to_str(lexer::reader r, token t) -> str {
172
172
case ( EOF ) { ret "<eof>" ; }
173
173
}
174
174
}
175
+
176
+
177
+ pred can_begin_expr ( token t) -> bool {
178
+ alt ( t) {
179
+ case ( LPAREN ) { true }
180
+ case ( LBRACE ) { true }
181
+ case ( IDENT ( _, _) ) { true }
182
+ case ( UNDERSCORE ) { true }
183
+ case ( TILDE ) { true }
184
+ case ( LIT_INT ( _) ) { true }
185
+ case ( LIT_UINT ( _) ) { true }
186
+ case ( LIT_MACH_INT ( _, _) ) { true }
187
+ case ( LIT_FLOAT ( _) ) { true }
188
+ case ( LIT_MACH_FLOAT ( _, _) ) { true }
189
+ case ( LIT_STR ( _) ) { true }
190
+ case ( LIT_CHAR ( _) ) { true }
191
+ case ( POUND ) { true }
192
+ case ( AT ) { true }
193
+ case ( _) { false }
194
+ }
195
+ }
175
196
// Local Variables:
176
197
// fill-column: 78;
177
198
// indent-tabs-mode: nil
You can’t perform that action at this time.
0 commit comments