可以处理生成加法的IR

This commit is contained in:
jing
2025-12-28 18:44:48 +08:00
parent 77bee889d7
commit e941cced9b
42 changed files with 919 additions and 158 deletions

16
src/frontend/AstBuilder.h Normal file
View File

@@ -0,0 +1,16 @@
// 将 ANTLR parse tree 转换为内部 AST。
#pragma once
#include <memory>
namespace antlr4 {
namespace tree {
class ParseTree;
}
} // namespace antlr4
namespace ast {
struct CompUnit;
}
std::shared_ptr<ast::CompUnit> BuildAst(antlr4::tree::ParseTree* tree);