Add parse support for expr_ext.
This commit is contained in:
parent
59bce06a96
commit
890d027b65
2 changed files with 12 additions and 0 deletions
|
@ -164,6 +164,7 @@ tag expr_ {
|
||||||
expr_field(@expr, ident, ann);
|
expr_field(@expr, ident, ann);
|
||||||
expr_index(@expr, @expr, ann);
|
expr_index(@expr, @expr, ann);
|
||||||
expr_path(path, option.t[def], ann);
|
expr_path(path, option.t[def], ann);
|
||||||
|
expr_ext(vec[@expr], option.t[@expr], ann);
|
||||||
}
|
}
|
||||||
|
|
||||||
type lit = spanned[lit_];
|
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);
|
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 (_) {
|
case (_) {
|
||||||
auto lit = parse_lit(p);
|
auto lit = parse_lit(p);
|
||||||
hi = lit.span;
|
hi = lit.span;
|
||||||
|
|
Loading…
Reference in a new issue