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/parser.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/parser.rs')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 75dae09fd0d..7e6fb726f67 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -507,7 +507,7 @@ class parser { let lo = self.span.lo; self.bump(); alt copy self.token { - token::LIT_INT(num, ty_i) { + token::LIT_INT_UNSUFFIXED(num, _) { self.bump(); some(mac_var(num as uint)) } @@ -519,7 +519,7 @@ class parser { some(mac_aq(mk_sp(lo,hi), e)) } _ { - self.fatal("expected `(` or integer literal"); + self.fatal("expected `(` or unsuffixed integer literal"); } } } @@ -540,7 +540,7 @@ class parser { token::UNDERSCORE { self.bump(); some(vstore_fixed(none)) } - token::LIT_INT(i, ty_i) if i >= 0i64 { + token::LIT_INT_UNSUFFIXED(i, _) if i >= 0i64 { self.bump(); some(vstore_fixed(some(i as uint))) } token::BINOP(token::AND) { @@ -559,6 +559,7 @@ class parser { alt tok { token::LIT_INT(i, it) { lit_int(i, it) } token::LIT_UINT(u, ut) { lit_uint(u, ut) } + token::LIT_INT_UNSUFFIXED(i, it) { lit_int_unsuffixed(i, it) } token::LIT_FLOAT(s, ft) { lit_float(self.get_str(s), ft) } token::LIT_STR(s) { lit_str(self.get_str(s)) } token::LPAREN { self.expect(token::RPAREN); lit_nil } |
