2024-03-09 21:16:44 +08:00
|
|
|
|
namespace Canon.Core.Enums;
|
|
|
|
|
|
|
|
|
|
public enum SemanticTokenType
|
|
|
|
|
{
|
|
|
|
|
Keyword,
|
|
|
|
|
Number,
|
|
|
|
|
Operator,
|
|
|
|
|
Delimiter,
|
|
|
|
|
Identifier,
|
|
|
|
|
Character,
|
2024-03-10 15:37:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// 语法分析中的栈底符号
|
|
|
|
|
/// </summary>
|
|
|
|
|
End
|
2024-03-09 21:16:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum DelimiterType
|
|
|
|
|
{
|
|
|
|
|
Comma,
|
|
|
|
|
Period,
|
|
|
|
|
Colon,
|
|
|
|
|
Semicolon,
|
|
|
|
|
LeftParenthesis,
|
|
|
|
|
RightParenthesis,
|
|
|
|
|
LeftSquareBracket,
|
2024-03-10 11:14:52 +08:00
|
|
|
|
RightSquareBracket,
|
|
|
|
|
SingleQuotation,
|
|
|
|
|
DoubleQuotation
|
2024-03-09 21:16:44 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum KeywordType
|
|
|
|
|
{
|
|
|
|
|
Program,
|
|
|
|
|
Const,
|
|
|
|
|
Var,
|
|
|
|
|
Procedure,
|
|
|
|
|
Function,
|
|
|
|
|
Begin,
|
|
|
|
|
End,
|
|
|
|
|
Array,
|
|
|
|
|
Of,
|
|
|
|
|
If,
|
|
|
|
|
Then,
|
|
|
|
|
Else,
|
|
|
|
|
For,
|
|
|
|
|
To,
|
|
|
|
|
Do,
|
|
|
|
|
}
|
2024-03-10 11:14:52 +08:00
|
|
|
|
|
|
|
|
|
public enum OperatorType
|
|
|
|
|
{
|
|
|
|
|
Equal,
|
|
|
|
|
NotEqual,
|
|
|
|
|
Less,
|
|
|
|
|
LessEqual,
|
|
|
|
|
Greater,
|
|
|
|
|
GreaterEqual,
|
|
|
|
|
Plus,
|
|
|
|
|
Minus,
|
|
|
|
|
Multiply,
|
|
|
|
|
Divide,
|
|
|
|
|
Mod,
|
|
|
|
|
And,
|
|
|
|
|
Or,
|
|
|
|
|
Assign
|
|
|
|
|
}
|