diff options
Diffstat (limited to 'MoonParser/ast.hpp')
| -rw-r--r-- | MoonParser/ast.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/MoonParser/ast.hpp b/MoonParser/ast.hpp index d239eac..e7ae74f 100644 --- a/MoonParser/ast.hpp +++ b/MoonParser/ast.hpp | |||
| @@ -367,13 +367,20 @@ public: | |||
| 367 | clear(); | 367 | clear(); |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | void add(ast_node* node) { | 370 | void push_back(ast_node* node) { |
| 371 | if (accept(node)) { | 371 | if (accept(node)) { |
| 372 | m_objects.push_back(node); | 372 | m_objects.push_back(node); |
| 373 | node->retain(); | 373 | node->retain(); |
| 374 | } | 374 | } |
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | void push_front(ast_node* node) { | ||
| 378 | if (accept(node)) { | ||
| 379 | m_objects.push_front(node); | ||
| 380 | node->retain(); | ||
| 381 | } | ||
| 382 | } | ||
| 383 | |||
| 377 | const container& objects() const { | 384 | const container& objects() const { |
| 378 | return m_objects; | 385 | return m_objects; |
| 379 | } | 386 | } |
