lexer: start adding some more token types

This commit is contained in:
Ryan Chandler 2022-07-20 21:33:59 +01:00
parent 24c145d16b
commit 4b24d9e5d5
No known key found for this signature in database
GPG Key ID: F113BCADDB3B0CCA

View File

@ -7,44 +7,91 @@ pub enum OpenTagKind {
#[derive(Debug, PartialEq, Clone)]
pub enum TokenKind {
Identifier(String),
Variable(String),
Function,
Class,
Extends,
Implements,
Public,
Protected,
Private,
Static,
Final,
Abstract,
If,
AndEqual,
Array,
ArrayCast,
As,
Asterisk,
Attribute,
BoolCast,
BooleanAnd,
BooleanOr,
Break,
Callable,
Case,
Catch,
Class,
ClassConstant,
Clone,
CloseTag,
Coalesce,
CoalesceEqual,
Comment,
Comma,
ConcatEqual,
Const,
ConstantString,
Continue,
CurlyOpen,
Decrement,
Declare,
Default,
DirConstant,
DivEqual,
Do,
DocComment,
DoubleCast,
DoubleColon,
DoubleArrow,
DoubleEquals,
Echo,
Ellipsis,
Else,
ElseIf,
Return,
Echo,
Int(i64),
Plus,
Minus,
Empty,
EndDeclare,
EndFor,
EndForeach,
EndIf,
EndSwitch,
EndWhile,
Enum,
Eof,
Equals,
DoubleEquals,
TripleEquals,
LessThan,
LeftParen,
RightParen,
Extends,
Final,
Function,
GreaterThan,
GreaterThanEquals,
Identifier(String),
If,
Implements,
InlineHtml(String),
Int(i64),
LeftBrace,
LeftBracket,
RightBracket,
RightBrace,
LeftParen,
LessThan,
LessThanEquals,
Minus,
OpenTag(OpenTagKind),
CloseTag,
Percent,
Plus,
Pow,
Private,
Protected,
Public,
Return,
RightBrace,
RightBracket,
RightParen,
SemiColon,
Comma,
InlineHtml(String),
Eof,
Slash,
Static,
TripleEquals,
Var,
DoubleArrow,
Variable(String),
}
#[derive(Debug, Clone)]