Skip to content

Commit 890d027

Browse files
committed
Add parse support for expr_ext.
1 parent 59bce06 commit 890d027

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/comp/front/ast.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ tag expr_ {
164164
expr_field(@expr, ident, ann);
165165
expr_index(@expr, @expr, ann);
166166
expr_path(path, option.t[def], ann);
167+
expr_ext(vec[@expr], option.t[@expr], ann);
167168
}
168169

169170
type lit = spanned[lit_];

src/comp/front/parser.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,17 @@ impure fn parse_bottom_expr(parser p) -> @ast.expr {
586586
ex = ast.expr_bind(e, es.node, ast.ann_none);
587587
}
588588

589+
case (token.POUND) {
590+
p.bump();
591+
auto pf = parse_expr;
592+
auto es = parse_seq[@ast.expr](token.LPAREN,
593+
token.RPAREN,
594+
some(token.COMMA),
595+
pf, p);
596+
hi = es.span;
597+
ex = ast.expr_ext(es.node, none[@ast.expr], ast.ann_none);
598+
}
599+
589600
case (_) {
590601
auto lit = parse_lit(p);
591602
hi = lit.span;

0 commit comments

Comments
 (0)