Handle the mutant 'let'-block directive in rustboot, temporarily.
This commit is contained in:
parent
b2a09562a6
commit
9acf4b9127
@ -2168,10 +2168,25 @@ impure fn parse_crate_directive(parser p) -> ast.crate_directive
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case (token.LET) {
|
||||||
|
p.bump();
|
||||||
|
expect(p, token.LPAREN);
|
||||||
|
auto id = parse_ident(p);
|
||||||
|
expect(p, token.EQ);
|
||||||
|
auto x = parse_expr(p);
|
||||||
|
expect(p, token.RPAREN);
|
||||||
|
expect(p, token.LBRACE);
|
||||||
|
auto v = parse_crate_directives(p, token.RBRACE);
|
||||||
|
hi = p.get_span();
|
||||||
|
expect(p, token.RBRACE);
|
||||||
|
ret spanned(lo, hi, ast.cdir_let(id, x, v));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fail;
|
fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
impure fn parse_crate_directives(parser p, token.token term)
|
impure fn parse_crate_directives(parser p, token.token term)
|
||||||
-> vec[@ast.crate_directive] {
|
-> vec[@ast.crate_directive] {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user