Fix assertion failure when syntax extension name is missing.
This commit is contained in:
parent
7c8ee712be
commit
a4421cc4e8
|
@ -955,6 +955,9 @@ fn parse_syntax_ext(&parser p) -> @ast::expr {
|
|||
|
||||
fn parse_syntax_ext_naked(&parser p, uint lo) -> @ast::expr {
|
||||
auto pth = parse_path(p);
|
||||
if (vec::len(pth.node.idents) == 0u) {
|
||||
p.fatal("expected a syntax expander name");
|
||||
}
|
||||
auto es = parse_seq(token::LPAREN, token::RPAREN,
|
||||
some(token::COMMA), parse_expr, p);
|
||||
auto hi = es.span.hi;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
// error-pattern:expected a syntax expander name
|
||||
|
||||
fn main() {
|
||||
#();
|
||||
}
|
Loading…
Reference in New Issue