feat(furc/IR): move IR from furlang to furc
First try baby, whoo!
This commit is contained in:
+5
-6
@@ -1,3 +1,4 @@
|
||||
#include "furc/back/ir.hpp"
|
||||
#include "furc/front/lexer.hpp"
|
||||
#include "furc/front/parser.hpp"
|
||||
#include "furlang/arena.hpp"
|
||||
@@ -6,17 +7,15 @@ int main(void) {
|
||||
furlang::arena arena;
|
||||
|
||||
std::string_view content = R"(
|
||||
func main(argc: u64) -> s32 pre(arc > 1) {
|
||||
func main(argc: u64) -> s32 {
|
||||
x: s32 = 1 + 2 * 3;
|
||||
println(x);
|
||||
return if (x == 9) 1 else 0;
|
||||
}
|
||||
)";
|
||||
|
||||
furc::lexer lexer = { "<AK>", content };
|
||||
furc::parser parser = { std::move(lexer), arena };
|
||||
|
||||
auto program = parser.parse();
|
||||
furc::lexer lexer = { "<AK>", content };
|
||||
furc::parser parser = { std::move(lexer), arena };
|
||||
furc::ir_module irModule = furc::ir_generator::generate(parser.parse());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user