File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ //! The notcc lexer
2+ pub enum TokenKind {
3+ // Keywords come first so they get precedence in parsing over things
4+ // like IDENTIFIER. This works as integer keys used in PATTERN_MAP
5+ // below are iterated in ascending numeric order.
6+ KwInt ,
7+ KwVoid ,
8+ KwReturn ,
9+ KwIf ,
10+ KwElse ,
11+ LeftParen ,
12+ RightParen ,
13+ LeftCurly ,
14+ RightCurly ,
15+ LeftSquare ,
16+ RightSquare ,
17+ Semicolon ,
18+ Identifier ,
19+ IntConstant ,
20+ UnaryBitwiseComplement ,
21+ LogicalNot ,
22+ Decrement ,
23+ Minus ,
24+ Plus ,
25+ Times ,
26+ Divide ,
27+ Remainder ,
28+ And ,
29+ Or ,
30+ Less ,
31+ LessEq ,
32+ Greater ,
33+ GreaterEq ,
34+ Equal ,
35+ NotEqual ,
36+ Assign ,
37+ Question ,
38+ Colon ,
39+ }
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ pub mod error;
44pub use driver:: { arg_parser:: Cli , driver_main, driver_main_cli} ;
55
66mod driver;
7+ mod lex;
You can’t perform that action at this time.
0 commit comments