diff options
| author | Lindsey Kuper <lindsey@rockstargirl.org> | 2012-06-11 16:31:03 -0700 |
|---|---|---|
| committer | Lindsey Kuper <lindsey@rockstargirl.org> | 2012-06-11 16:34:56 -0700 |
| commit | 8467279faccc3837cddf854e30eafb3a086c3c9e (patch) | |
| tree | 6980e71b1a286ecd2a093a96205bbe8971cb450d /src/libsyntax/parse/classify.rs | |
| parent | baf58a764b4cc5ffc3de7bf43b549a4cc59a57a4 (diff) | |
| download | rust-8467279faccc3837cddf854e30eafb3a086c3c9e.tar.gz rust-8467279faccc3837cddf854e30eafb3a086c3c9e.zip | |
Add a new AST node for unsuffixed integer types.
Diffstat (limited to 'src/libsyntax/parse/classify.rs')
| -rw-r--r-- | src/libsyntax/parse/classify.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libsyntax/parse/classify.rs b/src/libsyntax/parse/classify.rs index 471fe15788d..aff0334a946 100644 --- a/src/libsyntax/parse/classify.rs +++ b/src/libsyntax/parse/classify.rs @@ -51,7 +51,14 @@ fn need_parens(expr: @ast::expr, outer_prec: uint) -> bool { fn ends_in_lit_int(ex: @ast::expr) -> bool { alt ex.node { - ast::expr_lit(@{node: ast::lit_int(_, ast::ty_i), _}) { true } + ast::expr_lit(node) { + alt node { + @{node: ast::lit_int(_, ast::ty_i), _} | + @{node: ast::lit_int_unsuffixed(_, ast::ty_i), _} + { true } + _ { false } + } + } ast::expr_binary(_, _, sub) | ast::expr_unary(_, sub) | ast::expr_move(_, sub) | ast::expr_copy(sub) | ast::expr_assign(_, sub) | |
