Skip to content

Commit fa86b5d

Browse files
committed
syntax: Remove unused BRACEQUOTE, IDX, LIT_BOOL tokens
1 parent e3961df commit fa86b5d

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

src/librustsyntax/parse/comments.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ fn is_lit(t: token::token) -> bool {
154154
token::LIT_UINT(_, _) { true }
155155
token::LIT_FLOAT(_, _) { true }
156156
token::LIT_STR(_) { true }
157-
token::LIT_BOOL(_) { true }
158157
_ { false }
159158
}
160159
}

src/librustsyntax/parse/token.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,10 @@ enum token {
6464
LIT_UINT(u64, ast::uint_ty),
6565
LIT_FLOAT(str_num, ast::float_ty),
6666
LIT_STR(str_num),
67-
LIT_BOOL(bool),
6867

6968
/* Name components */
7069
IDENT(str_num, bool),
71-
IDX(int),
7270
UNDERSCORE,
73-
BRACEQUOTE(str_num),
7471
EOF,
7572

7673
}
@@ -156,15 +153,12 @@ fn to_str(in: interner<str>, t: token) -> str {
156153
LIT_STR(s) { // FIXME: escape.
157154
ret "\"" + interner::get::<str>(in, s) + "\"";
158155
}
159-
LIT_BOOL(b) { if b { ret "true"; } else { ret "false"; } }
160156

161157
/* Name components */
162158
IDENT(s, _) {
163159
ret interner::get::<str>(in, s);
164160
}
165-
IDX(i) { ret "_" + int::to_str(i, 10u); }
166161
UNDERSCORE { ret "_"; }
167-
BRACEQUOTE(_) { ret "<bracequote>"; }
168162
EOF { ret "<eof>"; }
169163
}
170164
}

0 commit comments

Comments
 (0)