Skip to content

Commit 539e528

Browse files
jdmbrson
authored andcommitted
---
yaml --- r: 3551 b: refs/heads/master c: a4421cc h: refs/heads/master i: 3549: 83e10a7 3547: 5d82f9d 3543: 9511681 3535: 4bc32d0 3519: e34a593 v: v3
1 parent 2001619 commit 539e528

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 7c8ee712be3680bf9a0ad5bed6b2d348df674857
2+
refs/heads/master: a4421cc4e8fae4514dc948271f89c21fa69bacee

trunk/src/comp/front/parser.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,9 @@ fn parse_syntax_ext(&parser p) -> @ast::expr {
955955

956956
fn parse_syntax_ext_naked(&parser p, uint lo) -> @ast::expr {
957957
auto pth = parse_path(p);
958+
if (vec::len(pth.node.idents) == 0u) {
959+
p.fatal("expected a syntax expander name");
960+
}
958961
auto es = parse_seq(token::LPAREN, token::RPAREN,
959962
some(token::COMMA), parse_expr, p);
960963
auto hi = es.span.hi;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// error-pattern:expected a syntax expander name
2+
3+
fn main() {
4+
#();
5+
}

0 commit comments

Comments
 (0)