完成表达式Ast定义。修改了format文件

This commit is contained in:
2026-02-14 18:00:46 +08:00
parent 51e831cc6a
commit 35e479fd05
8 changed files with 307 additions and 14 deletions
+28
View File
@@ -0,0 +1,28 @@
/*!
@file src/Ast/Expr/LiteralExpr.hpp
@brief 字面量表达式定义
@author PuqiAR (im@puqiar.top)
@date 2026-02-14
*/
#pragma once
#include <Ast/Base.hpp>
#include <Token/Token.hpp>
namespace Fig
{
struct LiteralExpr final : Expr
{
Token token;
LiteralExpr()
{
type = AstType::LiteralExpr;
}
LiteralExpr(const Token& token) : token(token)
{
type = AstType::LiteralExpr;
}
};
}; // namespace Fig