95 lines
1.8 KiB
C#
95 lines
1.8 KiB
C#
|
|
namespace Upsilon.Parser
|
|
{
|
|
public enum SyntaxKind
|
|
{
|
|
// misc
|
|
EndOfFile,
|
|
WhiteSpace,
|
|
BadToken,
|
|
Comment,
|
|
|
|
// tokens
|
|
Number,
|
|
Plus,
|
|
Minus,
|
|
Star,
|
|
Slash,
|
|
OpenParenthesis,
|
|
CloseParenthesis,
|
|
Equals,
|
|
EqualsEquals,
|
|
Tilde,
|
|
TildeEquals,
|
|
Comma,
|
|
FullStop,
|
|
String,
|
|
OpenBrace,
|
|
CloseBrace,
|
|
OpenBracket,
|
|
CloseBracket,
|
|
PoundSign,
|
|
Less,
|
|
LessEquals,
|
|
Greater,
|
|
GreaterEquals,
|
|
PercentSign,
|
|
RoofSign,
|
|
|
|
// key words
|
|
TrueKeyword,
|
|
FalseKeyword,
|
|
NotKeyword,
|
|
AndKeyword,
|
|
OrKeyword,
|
|
LocalKeyword,
|
|
EndKeyword,
|
|
IfKeyword,
|
|
ThenKeyword,
|
|
ElseIfKeyword,
|
|
ElseKeyword,
|
|
NilKeyword,
|
|
FunctionKeyword,
|
|
ReturnKeyword,
|
|
ForKeyword,
|
|
WhileKeyword,
|
|
InKeyword,
|
|
DoKeyword,
|
|
BreakKeyword,
|
|
|
|
Identifier,
|
|
Parameter,
|
|
|
|
// Expressions
|
|
UnaryExpression,
|
|
BinaryExpression,
|
|
LiteralExpression,
|
|
ParenthesizedExpression,
|
|
AssignmentStatement,
|
|
VariableExpression,
|
|
FunctionCallExpression,
|
|
BadExpression,
|
|
TableExpression,
|
|
IndexExpression,
|
|
FullStopIndexExpression,
|
|
MultiAssignmentStatement,
|
|
|
|
// script unit
|
|
ScriptUnit,
|
|
|
|
// statements
|
|
ExpressionStatement,
|
|
BlockStatement,
|
|
IfStatement,
|
|
ElseIfStatement,
|
|
ElseStatement,
|
|
FunctionExpression,
|
|
ReturnStatement,
|
|
FunctionAssignmentStatement,
|
|
TableAssignmentStatement,
|
|
NumericForStatement,
|
|
BreakStatement,
|
|
GenericForStatement,
|
|
WhileStatement
|
|
}
|
|
} |