You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
370 B

#include "irgen/IRGen.h"
#include <memory>
#include <stdexcept>
#include "SysYParser.h"
#include "ir/IR.h"
std::unique_ptr<ir::Module> GenerateIR(SysYParser::CompUnitContext& tree,
const SemanticContext& sema) {
auto module = std::make_unique<ir::Module>();
IRGenImpl gen(*module, sema);
gen.Gen(tree);
return module;
}