Make parser create trees
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <stack>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "tree.hpp"
|
||||
#include "parser.hpp"
|
||||
|
||||
/*
|
||||
@@ -44,8 +45,7 @@ std::stack<int> _indent_stack;
|
||||
YYLTYPE loc;
|
||||
|
||||
#define PUSH_TOKEN(token, text) do { \
|
||||
yylval = text ? new std::string(text) : NULL; \
|
||||
loc.first_line = loc.last_line = yylineno; \
|
||||
yylval.str = text ? new std::string(text) : NULL; \
|
||||
int status = yypush_parse(pstate, token, &yylval, &loc); \
|
||||
if (status != YYPUSH_MORE) { \
|
||||
yypstate_delete(pstate); \
|
||||
|
||||
Reference in New Issue
Block a user