summaryrefslogtreecommitdiff
path: root/node/FunctionNode.hh
diff options
context:
space:
mode:
authorNagi5Yeq <wu@x-nagi.com>2020-05-30 00:25:03 +0800
committerNagi5Yeq <wu@x-nagi.com>2020-05-30 00:25:03 +0800
commit56d68765016fc7aa68fe7b522de5e84c7a12123a (patch)
treeba9828637913aa40bc1b1509c5127be9bded3a6e /node/FunctionNode.hh
parentf15a071f6d599d2a21083dfb041b18db8d482949 (diff)
global variable, constant support
Diffstat (limited to 'node/FunctionNode.hh')
-rw-r--r--node/FunctionNode.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/node/FunctionNode.hh b/node/FunctionNode.hh
index 281f5da..415c2cc 100644
--- a/node/FunctionNode.hh
+++ b/node/FunctionNode.hh
@@ -10,9 +10,9 @@
namespace pcc {
class FunctionNode : public BaseNode {
public:
- FunctionNode(Context* context, std::string name,
- std::list<Declaration> arguments,
- std::list<std::shared_ptr<BaseNode>> LocalDeclarations,
+ FunctionNode(Context* context, std::string&& name,
+ std::list<Declaration>&& arguments,
+ std::list<std::shared_ptr<DeclNode>>&& LocalDeclarations,
std::shared_ptr<Type> type,
std::shared_ptr<StatementListNode> body);
virtual Value CodeGen() override;
@@ -20,7 +20,7 @@ class FunctionNode : public BaseNode {
protected:
std::string name_;
std::list<Declaration> arguments_;
- std::list<std::shared_ptr<BaseNode>> LocalDeclarations_;
+ std::list<std::shared_ptr<DeclNode>> LocalDeclarations_;
std::shared_ptr<Type> type_;
VariableList locals_;
std::shared_ptr<StatementListNode> body_;