1
Fork 0

syntax: Remove unused BRACEQUOTE, IDX, LIT_BOOL tokens

This commit is contained in:
Brian Anderson 2012-04-22 14:54:19 -07:00
parent e3961df78d
commit fa86b5d67f
2 changed files with 0 additions and 7 deletions

View file

@ -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 }
}
}

View file

@ -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>"; }
}
}