diff options
| author | Nagi5Yeq <wu@x-nagi.com> | 2020-05-25 00:53:57 +0800 |
|---|---|---|
| committer | Nagi5Yeq <wu@x-nagi.com> | 2020-05-25 00:53:57 +0800 |
| commit | c5e9f890dab0e4595482301d77876793c8bceb8c (patch) | |
| tree | cb115b6b5b8ffaa5d0de88f9ad5df34016223ec6 /node/StatementNode.cc | |
| parent | 3832be8be4b23fb9e93a3f181e4205eadbdbf4de (diff) | |
finish function node.
Parser.y: rename 'context' to 'ctx' to avoid conflict in new version bison.
Diffstat (limited to 'node/StatementNode.cc')
| -rw-r--r-- | node/StatementNode.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/node/StatementNode.cc b/node/StatementNode.cc new file mode 100644 index 0000000..b373b70 --- /dev/null +++ b/node/StatementNode.cc @@ -0,0 +1,11 @@ +#include "StatementNode.hh" + +namespace pcc { +template <> Value StatementListNode::CodeGen() { + Value result = nullptr; + for (auto& child : childs_) { + result = child->CodeGen(); + } + return result; +} +} // namespace pcc |
