aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/parser.rs
diff options
context:
space:
mode:
authorMarijn Haverbeke <[email protected]>2011-04-19 11:21:23 +0200
committerMarijn Haverbeke <[email protected]>2011-04-19 16:57:13 +0200
commit6d3a423094c77b25b20afe3a812a67f03080cc3d (patch)
treea2293502572a511ba35253830574632105b0b40d /src/comp/front/parser.rs
parentAdd log_err to rustboot (diff)
downloadrust-6d3a423094c77b25b20afe3a812a67f03080cc3d.tar.xz
rust-6d3a423094c77b25b20afe3a812a67f03080cc3d.zip
add log_err to rustc
Diffstat (limited to 'src/comp/front/parser.rs')
-rw-r--r--src/comp/front/parser.rs11
1 files changed, 9 insertions, 2 deletions
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; }
}
}