Skip to content

Commit aa07d51

Browse files
committed
---
yaml --- r: 3558 b: refs/heads/master c: 6369807 h: refs/heads/master v: v3
1 parent fd3ed2e commit aa07d51

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 48a69d2100622df88e3f1014eff00227401bf079
2+
refs/heads/master: 6369807ffedbe3f8fbfcef3febc5741dcf19cb43

trunk/src/comp/front/token.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,27 @@ fn to_str(lexer::reader r, token t) -> str {
172172
case (EOF) { ret "<eof>"; }
173173
}
174174
}
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+
}
175196
// Local Variables:
176197
// fill-column: 78;
177198
// indent-tabs-mode: nil

0 commit comments

Comments
 (0)