Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Implementation of Programming Languages / Transpiler / src / main.cpp
blob: 7f829d31b3002683c811e8c700e83172d1301fe0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
#include <deque>
#include "LLVMVisitor/LLVMVisitor.h"
#include "Value/Function/BuiltInFunction.h"

int main() {
	LLVMVisitor visitor("testout.ll");
	std::deque<Value*> nodes = {
		new BuiltInFunction("+", {
				new Integer(1),
				new Integer(2),
				new BuiltInFunction("-", { new Integer(5), new Integer(10) }),
				new Integer(123) }) };
	for (Value* n : nodes) {
		n->Visit(visitor);
	}
	visitor.finalizeFile();
}