diff options
| author | Nagi5Yeq <wu@x-nagi.com> | 2020-06-03 02:36:05 +0800 |
|---|---|---|
| committer | Nagi5Yeq <wu@x-nagi.com> | 2020-06-03 02:36:05 +0800 |
| commit | 2d6ab4b7f207a746a7caaa93466b410cbe328626 (patch) | |
| tree | 570a2d7776e616309149adf065acc474c0c0de98 /node/BaseNode.hh | |
| parent | cd1466f30c146e12faa0db7e1b53b508bf2274c6 (diff) | |
support for short, int64 and AST dump
Diffstat (limited to 'node/BaseNode.hh')
| -rw-r--r-- | node/BaseNode.hh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/node/BaseNode.hh b/node/BaseNode.hh index 22ab93a..8916ef1 100644 --- a/node/BaseNode.hh +++ b/node/BaseNode.hh @@ -4,12 +4,14 @@ #include <list> #include "Context.hh" +#include "Traveler.hh" namespace pcc { class BaseNode { public: BaseNode(Context* context); virtual Value CodeGen() = 0; + virtual int Travel(Traveler& traveler) = 0; protected: Context* context_; @@ -24,6 +26,7 @@ class ProgramNode : public BaseNode { std::list<std::shared_ptr<DeclNode>>&& GlobalDeclarations, std::list<std::shared_ptr<FunctionNode>>&& functions); virtual Value CodeGen() override; + virtual int Travel(Traveler& traveler) override; protected: std::string name_; |
