Return a reference with the ParseTree::getComponents() method.
This commit is contained in:
parent
5972f0ef4c
commit
24195f9a6c
|
@ -18,7 +18,7 @@ class ParseTree {
|
|||
protected:
|
||||
vector<ParseComponent> subComponents;
|
||||
public:
|
||||
auto getComponents() { return subComponents; }
|
||||
auto& getComponents() { return subComponents; }
|
||||
void add(const ParseComponent component) { subComponents.emplace_back(component); };
|
||||
void addAll(const vector<ParseComponent>& components) { for (const auto& comp: components) add(comp); }
|
||||
ParseTree(): subComponents() {};
|
||||
|
|
Loading…
Reference in New Issue