summaryrefslogtreecommitdiff
path: root/node/FunctionNode.hh
diff options
context:
space:
mode:
authorNagi5Yeq <wu@x-nagi.com>2020-05-31 17:49:34 +0800
committerNagi5Yeq <wu@x-nagi.com>2020-05-31 17:49:34 +0800
commitc2c6e5c7e620c32e7f420e8b9ac21df8855b444c (patch)
treec790ec3650c2f6caed9b59b304bc6a8bbdef1da8 /node/FunctionNode.hh
parent4a5bc55769804d003d6cd9f8c16eefb76bb53d1b (diff)
support for extern functions
Diffstat (limited to 'node/FunctionNode.hh')
-rw-r--r--node/FunctionNode.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/node/FunctionNode.hh b/node/FunctionNode.hh
index e939121..6860c45 100644
--- a/node/FunctionNode.hh
+++ b/node/FunctionNode.hh
@@ -25,6 +25,18 @@ class FunctionNode : public BaseNode {
VariableList locals_;
std::shared_ptr<StatementListNode> body_;
};
+
+class ExternNode : public FunctionNode {
+ public:
+ ExternNode(Context* context, std::string&& name,
+ std::list<Declaration>&& arguments,
+ std::shared_ptr<TypeIdentifier> ReturnTypeIdentifier,
+ bool IsVariadic);
+ virtual Value CodeGen() override;
+
+ protected:
+ bool IsVariadic_;
+};
} // namespace pcc
#endif