diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-05-07 12:21:02 +0200 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-05-07 12:21:02 +0200 |
| commit | 42212bb44a3abb76b145238866ad1dc1f9589b8f (patch) | |
| tree | 99bc1cd2ea7726db5ebedd4162aefacdc400133d | |
| parent | 6b56f790dbf094d4f08c7c0f434d31b6c786f6e5 (diff) | |
| parent | 9c7d5ae57c27ebfc019c2c23283bb905d8c3b74f (diff) | |
| download | rust-42212bb44a3abb76b145238866ad1dc1f9589b8f.tar.gz rust-42212bb44a3abb76b145238866ad1dc1f9589b8f.zip | |
Rollup merge of #25137 - carols10cents:fix-token-declaration, r=alexcrichton
I know this is the most trivial thing since it's *just* the model lexer, not the real lexer, but [it is simpler to read](https://github.com/rust-lang/rust/issues/15883#issuecomment-72906431) and it'd be great if it was up to date but [it's been rotting](https://github.com/rust-lang/rust/issues/22379) and this is a tiny bit of that. Thanks!!!!!!
| -rw-r--r-- | src/grammar/RustLexer.g4 | 8 | ||||
| -rw-r--r-- | src/grammar/verify.rs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/grammar/RustLexer.g4 b/src/grammar/RustLexer.g4 index 3d8f3aeb28f..f062d33f25e 100644 --- a/src/grammar/RustLexer.g4 +++ b/src/grammar/RustLexer.g4 @@ -8,14 +8,14 @@ lexer grammar RustLexer; tokens { - EQ, LT, LE, EQEQ, NE, GE, GT, ANDAND, OROR, NOT, TILDE, PLUT, + EQ, LT, LE, EQEQ, NE, GE, GT, ANDAND, OROR, NOT, TILDE, PLUS, MINUS, STAR, SLASH, PERCENT, CARET, AND, OR, SHL, SHR, BINOP, BINOPEQ, AT, DOT, DOTDOT, DOTDOTDOT, COMMA, SEMI, COLON, MOD_SEP, RARROW, FAT_ARROW, LPAREN, RPAREN, LBRACKET, RBRACKET, - LBRACE, RBRACE, POUND, DOLLAR, UNDERSCORE, LIT_CHAR, + LBRACE, RBRACE, POUND, DOLLAR, UNDERSCORE, LIT_CHAR, LIT_BYTE, LIT_INTEGER, LIT_FLOAT, LIT_STR, LIT_STR_RAW, LIT_BINARY, - LIT_BINARY_RAW, IDENT, LIFETIME, WHITESPACE, DOC_COMMENT, - COMMENT, SHEBANG + LIT_BINARY_RAW, QUESTION, IDENT, LIFETIME, WHITESPACE, DOC_COMMENT, + COMMENT, SHEBANG, UTF8_BOM } import xidstart , xidcontinue; diff --git a/src/grammar/verify.rs b/src/grammar/verify.rs index dec797747c2..10b8abfc786 100644 --- a/src/grammar/verify.rs +++ b/src/grammar/verify.rs @@ -111,7 +111,7 @@ fn parse_token_list(file: &str) -> HashMap<String, token::Token> { "LIT_BINARY_RAW" => token::Literal(token::BinaryRaw(Name(0), 0), None), "QUESTION" => token::Question, "SHEBANG" => token::Shebang(Name(0)), - _ => continue, + _ => panic!("Bad token str `{}`", val), }; res.insert(num.to_string(), tok); |
