From 6d3a423094c77b25b20afe3a812a67f03080cc3d Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Tue, 19 Apr 2011 11:21:23 +0200 Subject: add log_err to rustc --- src/comp/front/parser.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/comp/front/parser.rs') diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index 2e6e7c29..2c21c957 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -810,7 +810,14 @@ impure fn parse_bottom_expr(parser p) -> @ast.expr { p.bump(); auto e = parse_expr(p); auto hi = e.span.hi; - ex = ast.expr_log(e, ast.ann_none); + ex = ast.expr_log(1, e, ast.ann_none); + } + + case (token.LOG_ERR) { + p.bump(); + auto e = parse_expr(p); + auto hi = e.span.hi; + ex = ast.expr_log(0, e, ast.ann_none); } case (token.CHECK) { @@ -1669,7 +1676,7 @@ fn stmt_ends_with_semi(@ast.stmt stmt) -> bool { case (ast.expr_ret(_,_)) { ret true; } case (ast.expr_put(_,_)) { ret true; } case (ast.expr_be(_,_)) { ret true; } - case (ast.expr_log(_,_)) { ret true; } + case (ast.expr_log(_,_,_)) { ret true; } case (ast.expr_check_expr(_,_)) { ret true; } } } -- cgit v1.2.3