Skip to content

Commit 023644a

Browse files
committed
---
yaml --- r: 23390 b: refs/heads/master c: 0a5f88a h: refs/heads/master v: v3
1 parent 68b43d1 commit 023644a

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 73ffc7e7005142c5a2d898fcb2aa39018efe07fb
2+
refs/heads/master: 0a5f88a2406bf78a216ea8e2128441766dd7cd9c
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libsyntax/ast.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ enum blk_check_mode { default_blk, unchecked_blk, unsafe_blk, }
309309
type expr = {id: node_id, callee_id: node_id, node: expr_, span: span};
310310
// Extra node ID is only used for index, assign_op, unary, binary
311311

312+
#[auto_serialize]
313+
enum log_level { error, debug, other }
314+
// 0 = error, 1 = debug, 2 = other
315+
312316
#[auto_serialize]
313317
enum alt_mode { alt_check, alt_exhaustive, }
314318

@@ -354,7 +358,7 @@ enum expr_ {
354358
expr_break(option<ident>),
355359
expr_again(option<ident>),
356360
expr_ret(option<@expr>),
357-
expr_log(int, @expr, @expr),
361+
expr_log(log_level, @expr, @expr),
358362

359363
/* just an assert */
360364
expr_assert(@expr),

trunk/src/libsyntax/parse/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ struct parser {
947947
let lvl = self.parse_expr();
948948
self.expect(token::COMMA);
949949
let e = self.parse_expr();
950-
ex = expr_log(2, lvl, e);
950+
ex = expr_log(ast::other, lvl, e);
951951
hi = self.span.hi;
952952
self.expect(token::RPAREN);
953953
} else if self.eat_keyword(~"assert") {

trunk/src/libsyntax/print/pprust.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,10 +1309,10 @@ fn print_expr(s: ps, &&expr: @ast::expr) {
13091309
}
13101310
}
13111311
ast::expr_log(lvl, lexp, expr) => {
1312-
match check lvl {
1313-
1 => { word_nbsp(s, ~"log"); print_expr(s, expr); }
1314-
0 => { word_nbsp(s, ~"log_err"); print_expr(s, expr); }
1315-
2 => {
1312+
match lvl {
1313+
ast::debug => { word_nbsp(s, ~"log"); print_expr(s, expr); }
1314+
ast::error => { word_nbsp(s, ~"log_err"); print_expr(s, expr); }
1315+
ast::other => {
13161316
word_nbsp(s, ~"log");
13171317
popen(s);
13181318
print_expr(s, lexp);

0 commit comments

Comments
 (0)