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/LiteralNode.hh | |
| parent | cd1466f30c146e12faa0db7e1b53b508bf2274c6 (diff) | |
support for short, int64 and AST dump
Diffstat (limited to 'node/LiteralNode.hh')
| -rw-r--r-- | node/LiteralNode.hh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/node/LiteralNode.hh b/node/LiteralNode.hh index f93c171..3923334 100644 --- a/node/LiteralNode.hh +++ b/node/LiteralNode.hh @@ -7,10 +7,12 @@ #include "ExprNode.hh" namespace pcc { -template <typename T> class LiteralNode : public ExprNode { +template <typename T> +class LiteralNode : public ExprNode { public: LiteralNode(Context* context, std::shared_ptr<Type> type, T value); virtual Value CodeGen() override; + virtual int Travel(Traveler& traveler) override; private: T value_; @@ -36,6 +38,7 @@ class StringLiteralNode : public ExprNode { StringLiteralNode(Context* context, std::shared_ptr<Type> type, std::vector<char> value); virtual Value CodeGen() override; + virtual int Travel(Traveler& traveler) override; private: std::vector<char> value_; |
