summaryrefslogtreecommitdiff
path: root/include/parser.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/parser.hpp')
-rw-r--r--include/parser.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/parser.hpp b/include/parser.hpp
index 567ef03..a4e11af 100644
--- a/include/parser.hpp
+++ b/include/parser.hpp
@@ -5,7 +5,7 @@
#ifndef PARSER_H
#define PARSER_H
#include <string>
-#include <vector>
+#include <deque>
#include "expressions.hpp"
#include "lexer.hpp"
@@ -13,11 +13,11 @@ class Parser{
private:
std::string text;
Lexer tokenizer;
- std::vector<Expression *> tree_stack;
+ std::deque<Expression *> tree_queue;
Token var{nil, "{}"};
void panic();
- Expression *popStack();
- Expression *newTree(token_type type);
+ Expression *popQueue();
+ Expression *newTree(token_type type, Expression *left, Expression *right);
void setText(std::string text);
void parseExpr();
void parsePrimeExpr();