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)
|
switch (type)
|
||||||
{
|
{
|
||||||
case NODE_TYPE_LIST:
|
case NODE_TYPE_LIST:
|
||||||
list = new std::vector<Node *>();
|
list = new std::list<Node *>();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
declarator_name = nullptr;
|
declarator_name = nullptr;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define NODE_H
|
#define NODE_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <list>
|
||||||
|
|
||||||
class Node
|
class Node
|
||||||
{
|
{
|
||||||
@ -18,7 +18,7 @@ public:
|
|||||||
size_t line;
|
size_t line;
|
||||||
std::string * text;
|
std::string * text;
|
||||||
} token;
|
} token;
|
||||||
std::vector<Node *> * list;
|
std::list<Node *> * list;
|
||||||
};
|
};
|
||||||
std::string * declarator_name;
|
std::string * declarator_name;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user