rust/src/grammar/tokens.h

110 lines
1.5 KiB
C
Raw Normal View History

2017-05-08 05:33:43 -06:00
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
enum Token {
SHL = 257, // Parser generators reserve 0-256 for char literals
SHR,
LE,
EQEQ,
NE,
GE,
ANDAND,
OROR,
SHLEQ,
SHREQ,
MINUSEQ,
ANDEQ,
OREQ,
PLUSEQ,
STAREQ,
SLASHEQ,
CARETEQ,
PERCENTEQ,
DOTDOT,
DOTDOTDOT,
MOD_SEP,
LARROW,
2017-05-08 05:33:43 -06:00
RARROW,
FAT_ARROW,
LIT_BYTE,
LIT_CHAR,
LIT_INTEGER,
LIT_FLOAT,
LIT_STR,
LIT_STR_RAW,
LIT_BYTE_STR,
LIT_BYTE_STR_RAW,
IDENT,
UNDERSCORE,
LIFETIME,
// keywords
SELF,
STATIC,
ABSTRACT,
ALIGNOF,
2017-05-08 05:33:43 -06:00
AS,
BECOME,
2017-05-08 05:33:43 -06:00
BREAK,
CATCH,
2017-05-08 05:33:43 -06:00
CRATE,
DEFAULT,
DO,
2017-05-08 05:33:43 -06:00
ELSE,
ENUM,
EXTERN,
FALSE,
FINAL,
2017-05-08 05:33:43 -06:00
FN,
FOR,
IF,
IMPL,
IN,
LET,
LOOP,
MACRO,
2017-05-08 05:33:43 -06:00
MATCH,
MOD,
MOVE,
MUT,
OFFSETOF,
OVERRIDE,
2017-05-08 05:33:43 -06:00
PRIV,
PUB,
PURE,
2017-05-08 05:33:43 -06:00
REF,
RETURN,
SIZEOF,
2017-05-08 05:33:43 -06:00
STRUCT,
SUPER,
UNION,
2017-05-08 05:33:43 -06:00
TRUE,
TRAIT,
TYPE,
UNSAFE,
UNSIZED,
2017-05-08 05:33:43 -06:00
USE,
VIRTUAL,
2017-05-08 05:33:43 -06:00
WHILE,
YIELD,
2017-05-08 05:33:43 -06:00
CONTINUE,
PROC,
BOX,
CONST,
WHERE,
TYPEOF,
INNER_DOC_COMMENT,
OUTER_DOC_COMMENT,
SHEBANG,
SHEBANG_LINE,
STATIC_LIFETIME
};