use a list instead of a vector for list Nodes
This commit is contained in:
parent
bd52a4c5d5
commit
4ab2032c00
@ -7,7 +7,7 @@ Node::Node(int _type)
|
||||
switch (type)
|
||||
{
|
||||
case NODE_TYPE_LIST:
|
||||
list = new std::vector<Node *>();
|
||||
list = new std::list<Node *>();
|
||||
break;
|
||||
}
|
||||
declarator_name = nullptr;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define NODE_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
|
||||
class Node
|
||||
{
|
||||
@ -18,7 +18,7 @@ public:
|
||||
size_t line;
|
||||
std::string * text;
|
||||
} token;
|
||||
std::vector<Node *> * list;
|
||||
std::list<Node *> * list;
|
||||
};
|
||||
std::string * declarator_name;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user