diff options
| author | Graydon Hoare <[email protected]> | 2010-12-09 17:12:08 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-12-09 17:12:08 -0800 |
| commit | d5ed5e70449d66e6c86a3068a1d5601c5b11c7fe (patch) | |
| tree | fd308b87de00d70121c17fdbf7277a71e62799b6 /src/comp/front | |
| parent | Add 'unexpected' fn to parser. (diff) | |
| download | rust-d5ed5e70449d66e6c86a3068a1d5601c5b11c7fe.tar.xz rust-d5ed5e70449d66e6c86a3068a1d5601c5b11c7fe.zip | |
Fix bug in parse rule for expr_index.
Diffstat (limited to 'src/comp/front')
| -rw-r--r-- | src/comp/front/parser.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index ee797e29..45d8a371 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -501,9 +501,14 @@ impure fn parse_path_expr(parser p) -> @ast.expr { p.bump(); auto ix = parse_bottom_expr(p); hi = ix.span; + expect(p, token.RPAREN); auto e_ = ast.expr_index(e, ix, ast.ann_none); e = @spanned(lo, hi, e_); } + + case (?t) { + unexpected(p, t); + } } } case (_) { |