diff --git a/src/headers/parsing/ParseComponents.hpp b/src/headers/parsing/ParseComponents.hpp index dad5d59..6a1c619 100644 --- a/src/headers/parsing/ParseComponents.hpp +++ b/src/headers/parsing/ParseComponents.hpp @@ -22,7 +22,8 @@ public: subComponents.push_back(component); }; void addAll(const vector& components) const { for (const auto& comp: components) add(comp); - }; void operator<<(const ParseComponent& component) const { add(component); } + } + const ParseTree& operator<<(const ParseComponent& component) const { add(component); return *this; } explicit ParseTree(const ParseComponent& element): subComponents() { add(element); } ParseTree(const initializer_list& elements): subComponents() { addAll(elements); } ParseTree(): subComponents() {};