Skip to content

Commit 41f0067

Browse files
committed
---
yaml --- r: 3066 b: refs/heads/master c: 9ae843a h: refs/heads/master v: v3
1 parent 435b6b3 commit 41f0067

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
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: a1edf91f4882e9322ade619dd5607f3dd2751158
2+
refs/heads/master: 9ae843ab1c77b9c5cca03b452d5926a0fccf3197

trunk/src/comp/front/parser.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,6 +1265,7 @@ fn parse_binops(&parser p) -> @ast::expr {
12651265
ret parse_more_binops(p, parse_prefix_expr(p), 0);
12661266
}
12671267

1268+
const int unop_prec = 100;
12681269
const int as_prec = 5;
12691270

12701271
fn parse_more_binops(&parser p, @ast::expr lhs, int min_prec)

trunk/src/comp/pretty/pprust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ fn print_expr(&ps s, &@ast::expr expr) {
551551
}
552552
case (ast::expr_unary(?op,?expr,_)) {
553553
word(s.s, ast::unop_to_str(op));
554-
print_expr(s, expr);
554+
print_maybe_parens(s, expr, front::parser::unop_prec);
555555
}
556556
case (ast::expr_lit(?lit,_)) {
557557
print_literal(s, lit);

0 commit comments

Comments
 (0)