提交 a4421cc4 编写于 作者: J Josh Matthews 提交者: Brian Anderson

Fix assertion failure when syntax extension name is missing.

上级 7c8ee712
......@@ -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;
......
// error-pattern:expected a syntax expander name
fn main() {
#();
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册