Add parse support for expr_ext.
This commit is contained in:
parent
59bce06a96
commit
890d027b65
@ -164,6 +164,7 @@ tag expr_ {
|
||||
expr_field(@expr, ident, ann);
|
||||
expr_index(@expr, @expr, ann);
|
||||
expr_path(path, option.t[def], ann);
|
||||
expr_ext(vec[@expr], option.t[@expr], ann);
|
||||
}
|
||||
|
||||
type lit = spanned[lit_];
|
||||
|
@ -586,6 +586,17 @@ impure fn parse_bottom_expr(parser p) -> @ast.expr {
|
||||
ex = ast.expr_bind(e, es.node, ast.ann_none);
|
||||
}
|
||||
|
||||
case (token.POUND) {
|
||||
p.bump();
|
||||
auto pf = parse_expr;
|
||||
auto es = parse_seq[@ast.expr](token.LPAREN,
|
||||
token.RPAREN,
|
||||
some(token.COMMA),
|
||||
pf, p);
|
||||
hi = es.span;
|
||||
ex = ast.expr_ext(es.node, none[@ast.expr], ast.ann_none);
|
||||
}
|
||||
|
||||
case (_) {
|
||||
auto lit = parse_lit(p);
|
||||
hi = lit.span;
|
||||
|
Loading…
x
Reference in New Issue
Block a user