#include #include #include "LLVMVisitor/LLVMVisitor.h" #include "Value/Function/Funcall.h" int main() { LLVMVisitor visitor("testout.ll"); std::deque nodes = { new Funcall("defvar", { new Name("myvar"), new Funcall("+", { new Funcall("-", { new Integer(8), new Integer(4) }), new Integer(19) }) }), new Funcall("+", { new Float(1), new Funcall("-", { new Float(5), new Float(10) }), new Float(2), new Float(123) }), new Funcall("defun", { new Name("notfun"), new List({new Name("a"), new Name("b")}), new Funcall("+", { new Integer(7), new Name("a"), new Name("b") }) }) }; for (Value* n : nodes) { n->Visit(visitor); } visitor.insertMain(); }