64 std::vector<std::unique_ptr<Node>> children;
69 template <
typename ... Nodes>
70 void init(
Node * node, Nodes ... nodes)
72 children.push_back(std::unique_ptr<Node>(node));
76 template <
typename ... Nodes>
77 void init(std::unique_ptr<Node> node, Nodes ... nodes)
79 children.push_back(std::move(node));
84 template <
typename ... Nodes>
92 children.push_back(std::unique_ptr<Node>(node));
96 List * Append(std::unique_ptr<Node> node)
98 children.push_back(std::move(node));
163 : type(type), value(value), list(list)
168 : type(type), value(value), list(
new List)
173 : type(type), value(
new Value<>), list(list)
182 std::unique_ptr<Node>& at(
size_t index)
184 return list->children[index];
187 const std::unique_ptr<Node>& at(
size_t index)
const
189 return list->children[index];