完成Parser定义以及表达式解析
This commit is contained in:
@@ -21,14 +21,15 @@ namespace Fig
|
||||
|
||||
IdentiExpr, // 标识符表达式
|
||||
LiteralExpr, // 字面量表达式
|
||||
UnaryExpr, // 一元表达式
|
||||
BinaryExpr, // 二元表达式
|
||||
TernaryExpr, // 三元表达式
|
||||
PrefixExpr, // 一元 前缀表达式
|
||||
InfixExpr, // 二元 中缀表达式
|
||||
};
|
||||
struct AstNode
|
||||
{
|
||||
AstType type = AstType::AstNode;
|
||||
SourceLocation location;
|
||||
|
||||
virtual String toString() const = 0;
|
||||
};
|
||||
|
||||
struct Expr : public AstNode
|
||||
|
||||
Reference in New Issue
Block a user