Implement check-exprs, un-xfail 5 rustc tests.
This commit is contained in:
parent
fc8b5155a8
commit
6d47d2abde
6 changed files with 64 additions and 3 deletions
|
@ -690,6 +690,22 @@ io fn parse_stmt(parser p) -> @ast.stmt {
|
|||
ret @spanned(lo, hi, ast.stmt_log(e));
|
||||
}
|
||||
|
||||
case (token.CHECK) {
|
||||
p.bump();
|
||||
alt (p.peek()) {
|
||||
case (token.LPAREN) {
|
||||
auto e = parse_expr(p);
|
||||
auto hi = p.get_span();
|
||||
expect(p, token.SEMI);
|
||||
ret @spanned(lo, hi, ast.stmt_check_expr(e));
|
||||
}
|
||||
case (_) {
|
||||
p.get_session().unimpl("constraint-check stmt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
case (token.LET) {
|
||||
auto decl = parse_let(p);
|
||||
auto hi = p.get_span();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue