mirror of
https://github.com/danog/parser.git
synced 2024-11-27 04:14:55 +01:00
lexer: start adding some more token types
This commit is contained in:
parent
24c145d16b
commit
4b24d9e5d5
@ -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)]
|
||||
|
Loading…
Reference in New Issue
Block a user