Canon/Canon.Core/Enums/SemanticEnums.cs
2024-03-10 15:37:18 +08:00

67 lines
824 B
C#

namespace Canon.Core.Enums;
public enum SemanticTokenType
{
Keyword,
Number,
Operator,
Delimiter,
Identifier,
Character,
/// <summary>
/// 语法分析中的栈底符号
/// </summary>
End
}
public enum DelimiterType
{
Comma,
Period,
Colon,
Semicolon,
LeftParenthesis,
RightParenthesis,
LeftSquareBracket,
RightSquareBracket,
SingleQuotation,
DoubleQuotation
}
public enum KeywordType
{
Program,
Const,
Var,
Procedure,
Function,
Begin,
End,
Array,
Of,
If,
Then,
Else,
For,
To,
Do,
}
public enum OperatorType
{
Equal,
NotEqual,
Less,
LessEqual,
Greater,
GreaterEqual,
Plus,
Minus,
Multiply,
Divide,
Mod,
And,
Or,
Assign
}