Skip to content

Commit 9acf4b9

Browse files
committed
Handle the mutant 'let'-block directive in rustboot, temporarily.
1 parent b2a0956 commit 9acf4b9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/comp/front/parser.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2168,10 +2168,25 @@ impure fn parse_crate_directive(parser p) -> ast.crate_directive
21682168
}
21692169
}
21702170
}
2171+
2172+
case (token.LET) {
2173+
p.bump();
2174+
expect(p, token.LPAREN);
2175+
auto id = parse_ident(p);
2176+
expect(p, token.EQ);
2177+
auto x = parse_expr(p);
2178+
expect(p, token.RPAREN);
2179+
expect(p, token.LBRACE);
2180+
auto v = parse_crate_directives(p, token.RBRACE);
2181+
hi = p.get_span();
2182+
expect(p, token.RBRACE);
2183+
ret spanned(lo, hi, ast.cdir_let(id, x, v));
2184+
}
21712185
}
21722186
fail;
21732187
}
21742188

2189+
21752190
impure fn parse_crate_directives(parser p, token.token term)
21762191
-> vec[@ast.crate_directive] {
21772192

0 commit comments

Comments
 (0)