Add main code to tie it all together

This commit is contained in:
Danila Fedorin 2019-08-05 00:10:10 -07:00
parent 85908ae0c4
commit f6c6a2be28

14
code/compiler_main.cpp Normal file
View File

@ -0,0 +1,14 @@
#include "compiler_ast.hpp"
#include "compiler_parser.hpp"
void yy::parser::error(const std::string& msg) {
std::cout << "An error occured: " << std::endl;
}
extern std::vector<definition_ptr> program;
int main() {
yy::parser parser;
parser.parse();
std::cout << program.size() << std::endl;
}