diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-04-22 14:54:19 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-04-22 14:58:10 -0700 |
| commit | fa86b5d67f22796797aac1f2f6267e270b1ba5d4 (patch) | |
| tree | 0c681efe2ef56a33b30fd30bd11f05004f6164bc /src/librustsyntax/parse | |
| parent | e3961df78d23e353ed48961bd82c27b2c935494c (diff) | |
| download | rust-fa86b5d67f22796797aac1f2f6267e270b1ba5d4.tar.gz rust-fa86b5d67f22796797aac1f2f6267e270b1ba5d4.zip | |
syntax: Remove unused BRACEQUOTE, IDX, LIT_BOOL tokens
Diffstat (limited to 'src/librustsyntax/parse')
| -rw-r--r-- | src/librustsyntax/parse/comments.rs | 1 | ||||
| -rw-r--r-- | src/librustsyntax/parse/token.rs | 6 |
2 files changed, 0 insertions, 7 deletions
diff --git a/src/librustsyntax/parse/comments.rs b/src/librustsyntax/parse/comments.rs index b755a83ebd6..b8b0a31b059 100644 --- a/src/librustsyntax/parse/comments.rs +++ b/src/librustsyntax/parse/comments.rs @@ -154,7 +154,6 @@ fn is_lit(t: token::token) -> bool { token::LIT_UINT(_, _) { true } token::LIT_FLOAT(_, _) { true } token::LIT_STR(_) { true } - token::LIT_BOOL(_) { true } _ { false } } } diff --git a/src/librustsyntax/parse/token.rs b/src/librustsyntax/parse/token.rs index 9413607aaf1..c086bdb0f39 100644 --- a/src/librustsyntax/parse/token.rs +++ b/src/librustsyntax/parse/token.rs @@ -64,13 +64,10 @@ enum token { LIT_UINT(u64, ast::uint_ty), LIT_FLOAT(str_num, ast::float_ty), LIT_STR(str_num), - LIT_BOOL(bool), /* Name components */ IDENT(str_num, bool), - IDX(int), UNDERSCORE, - BRACEQUOTE(str_num), EOF, } @@ -156,15 +153,12 @@ fn to_str(in: interner<str>, t: token) -> str { LIT_STR(s) { // FIXME: escape. ret "\"" + interner::get::<str>(in, s) + "\""; } - LIT_BOOL(b) { if b { ret "true"; } else { ret "false"; } } /* Name components */ IDENT(s, _) { ret interner::get::<str>(in, s); } - IDX(i) { ret "_" + int::to_str(i, 10u); } UNDERSCORE { ret "_"; } - BRACEQUOTE(_) { ret "<bracequote>"; } EOF { ret "<eof>"; } } } |
