about summary refs log tree commit diff
path: root/src/comp/syntax/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp/syntax/parse')
-rw-r--r--src/comp/syntax/parse/parser.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 5361a686814..2d11ae974d3 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -1109,6 +1109,13 @@ fn parse_dot_or_call_expr_with(p: &parser, e: @ast::expr) -> @ast::expr {
                 e = mk_expr(p, lo, hi, ast::expr_call(e, es.node));
             }
           }
+          token::LBRACKET. {
+            p.bump();
+            let ix = parse_expr(p);
+            hi = ix.span.hi;
+            expect(p, token::RBRACKET);
+            e = mk_expr(p, lo, hi, ast::expr_index(e, ix));
+          }
           token::DOT. {
             p.bump();
             alt p.peek() {