#include "gmqcc.h"
#include "lexer.h"
+#include "parser.h"
/* TODO: cleanup this whole file .. it's a fuckign mess */
}
data = ftepp_get(ftepp);
if (vec_size(data)) {
- if (!parser_compile_string(parser, items[itr].filename, data, vec_size(data))) {
+ if (!parser_compile_string(*parser, items[itr].filename, data, vec_size(data))) {
retval = 1;
goto cleanup;
}
ftepp_flush(ftepp);
}
else {
- if (!parser_compile_file(parser, items[itr].filename)) {
+ if (!parser_compile_file(*parser, items[itr].filename)) {
retval = 1;
goto cleanup;
}
ftepp_finish(ftepp);
ftepp = nullptr;
if (!OPTS_OPTION_BOOL(OPTION_PP_ONLY)) {
- if (!parser_finish(parser, OPTS_OPTION_STR(OPTION_OUTPUT))) {
+ if (!parser_finish(*parser, OPTS_OPTION_STR(OPTION_OUTPUT))) {
retval = 1;
goto cleanup;
}
vec_free(ppems);
if (!OPTS_OPTION_BOOL(OPTION_PP_ONLY))
- if(parser) parser_cleanup(parser);
+ delete parser;
/* free allocated option strings */
for (itr = 0; itr < OPTION_COUNT; itr++)