aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp/front/parser.rs')
-rw-r--r--src/comp/front/parser.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs
index 5c13ef86..bef37a3c 100644
--- a/src/comp/front/parser.rs
+++ b/src/comp/front/parser.rs
@@ -1158,6 +1158,11 @@ impure fn parse_stmt(parser p) -> @ast.stmt {
}
}
+ case (token.FAIL) {
+ p.bump();
+ ret @spanned(lo, p.get_span(), ast.stmt_fail);
+ }
+
case (token.RET) {
p.bump();
alt (p.peek()) {
@@ -1315,6 +1320,7 @@ fn stmt_ends_with_semi(@ast.stmt stmt) -> bool {
case (ast.stmt_ret(_)) { ret true; }
case (ast.stmt_log(_)) { ret true; }
case (ast.stmt_check_expr(_)) { ret true; }
+ case (ast.stmt_fail) { ret true; }
case (ast.stmt_expr(?e)) {
alt (e.node) {
case (ast.expr_vec(_,_)) { ret true; }