diff options
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/front/parser.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index 8cf088e4..ee797e29 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -68,6 +68,12 @@ impure fn new_parser(session.session sess, npos, npos, 0, crate, rdr); } +impure fn unexpected(parser p, token.token t) { + let str s = "unexpected token: "; + s += token.to_str(t); + p.err(s); +} + impure fn expect(parser p, token.token t) { if (p.peek() == t) { p.bump(); |