115 lines
2.8 KiB
C#
115 lines
2.8 KiB
C#
namespace Parser
|
|
{
|
|
public enum TokenKind
|
|
{
|
|
None = 0,
|
|
EndOfFile = 1,
|
|
Identifier = 2,
|
|
NumberLiteral = 3,
|
|
StringLiteral = 4,
|
|
DoubleQuotedStringLiteral = 5,
|
|
UnquotedStringLiteral = 6,
|
|
|
|
// trivia
|
|
|
|
Whitespace = 10,
|
|
Newline = 11,
|
|
Comment = 12,
|
|
MultilineComment = 13,
|
|
|
|
Assignment = 20,
|
|
Equality = 21,
|
|
Inequality = 22,
|
|
LogicalAnd = 23,
|
|
LogicalOr = 24,
|
|
BitwiseAnd = 25,
|
|
BitwiseOr = 26,
|
|
Less = 27,
|
|
LessOrEqual = 28,
|
|
Greater = 29,
|
|
GreaterOrEqual = 30,
|
|
Not = 31,
|
|
Plus = 32,
|
|
Minus = 33,
|
|
Multiply = 34,
|
|
Divide = 35,
|
|
Power = 36,
|
|
Backslash = 37,
|
|
Transpose = 38,
|
|
DotMultiply = 39,
|
|
DotDivide = 40,
|
|
DotPower = 41,
|
|
DotBackslash = 42,
|
|
DotTranspose = 43,
|
|
At = 44,
|
|
Colon = 45,
|
|
QuestionMark = 46,
|
|
Comma = 47,
|
|
Semicolon = 48,
|
|
OpeningBrace = 49,
|
|
ClosingBrace = 50,
|
|
OpeningSquareBracket = 51,
|
|
ClosingSquareBracket = 52,
|
|
OpeningBracket = 53,
|
|
ClosingBracket = 54,
|
|
Dot = 55,
|
|
DotDotDot = 56,
|
|
// unary tokens are not recognized during lexing; they are contextually recognized while parsing.
|
|
UnaryPlus = 57,
|
|
UnaryMinus = 58,
|
|
UnaryNot = 59,
|
|
UnaryQuestionMark = 60,
|
|
// syntax nodes
|
|
File = 100,
|
|
List,
|
|
FunctionDeclaration,
|
|
FunctionInputDescription,
|
|
FunctionOutputDescription,
|
|
SwitchStatement,
|
|
SwitchCase,
|
|
WhileStatement,
|
|
IfStatement,
|
|
ElseifClause,
|
|
ElseClause,
|
|
ForStatement,
|
|
AssignmentExpression,
|
|
CatchClause,
|
|
TryCatchStatement,
|
|
ExpressionStatement,
|
|
EmptyStatement,
|
|
EmptyExpression,
|
|
UnaryPrefixOperationExpression,
|
|
CompoundName,
|
|
NamedFunctionHandle,
|
|
Lambda,
|
|
BinaryOperation,
|
|
IdentifierName,
|
|
NumberLiteralExpression,
|
|
StringLiteralExpression,
|
|
DoubleQuotedStringLiteralExpression,
|
|
UnquotedStringLiteralExpression,
|
|
ArrayLiteralExpression,
|
|
CellArrayLiteralExpression,
|
|
ParenthesizedExpression,
|
|
CellArrayElementAccess,
|
|
FunctionCall,
|
|
MemberAccess,
|
|
UnaryPostfixOperationExpression,
|
|
IndirectMemberAccess,
|
|
Command,
|
|
ClassInvokation,
|
|
AttributeAssignment,
|
|
Attribute,
|
|
AttributeList,
|
|
MethodDefinition,
|
|
MethodsList,
|
|
PropertiesList,
|
|
BaseClassList,
|
|
ClassDeclaration,
|
|
EnumerationItemValue,
|
|
EnumerationItem,
|
|
EnumerationList,
|
|
AbstractMethodDeclaration,
|
|
EventsList,
|
|
}
|
|
} |