Skip to content

Commit 879ea2b

Browse files
committed
---
yaml --- r: 6910 b: refs/heads/master c: 047b02d h: refs/heads/master v: v3
1 parent dfe2c15 commit 879ea2b

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 7bf12f372355ab3213d99a42eb6dae1de2a53b06
2+
refs/heads/master: 047b02d5bc2675dd993aa2378703cba34a0e35bc

trunk/src/comp/syntax/parse/parser.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,10 +910,13 @@ fn parse_bottom_expr(p: parser) -> @ast::expr {
910910
ex = ast::expr_fail(some(e));
911911
} else { ex = ast::expr_fail(none); }
912912
} else if eat_word(p, "log_full") {
913+
expect(p, token::LPAREN);
913914
let lvl = parse_expr(p);
915+
expect(p, token::COMMA);
914916
let e = parse_expr(p);
915917
ex = ast::expr_log(2, lvl, e);
916-
hi = e.span.hi;
918+
hi = p.get_hi_pos();
919+
expect(p, token::RPAREN);
917920
} else if eat_word(p, "log") {
918921
let e = parse_expr(p);
919922
ex = ast::expr_log(1, mk_lit_u32(p, 1u32), e);

trunk/src/comp/syntax/print/pprust.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,8 +919,12 @@ fn print_expr(s: ps, &&expr: @ast::expr) {
919919
0 { word_nbsp(s, "log_err"); print_expr(s, expr); }
920920
2 {
921921
word_nbsp(s, "log_full");
922-
word(s.s, " ");
922+
popen(s);
923923
print_expr(s, lexp);
924+
word(s.s, ",");
925+
space_if_not_bol(s);
926+
print_expr(s, expr);
927+
pclose(s);
924928
}
925929
}
926930
}

0 commit comments

Comments
 (0)