|
@@ -154,18 +154,20 @@ struct qlow::sem::Method : public SemanticObject
|
|
ast::MethodDefinition* astNode;
|
|
ast::MethodDefinition* astNode;
|
|
ThisExpression* thisExpression;
|
|
ThisExpression* thisExpression;
|
|
std::unique_ptr<DoEndBlock> body;
|
|
std::unique_ptr<DoEndBlock> body;
|
|
|
|
+ bool isExtern;
|
|
|
|
|
|
LocalScope scope;
|
|
LocalScope scope;
|
|
|
|
|
|
llvm::Function* llvmNode;
|
|
llvm::Function* llvmNode;
|
|
|
|
|
|
inline Method(Scope& parentScope,
|
|
inline Method(Scope& parentScope,
|
|
- TypeId returnType) :
|
|
|
|
|
|
+ TypeId returnType, bool isExtern) :
|
|
SemanticObject{ parentScope.getContext() },
|
|
SemanticObject{ parentScope.getContext() },
|
|
containingClass{ nullptr },
|
|
containingClass{ nullptr },
|
|
returnType{ returnType },
|
|
returnType{ returnType },
|
|
thisExpression{ nullptr },
|
|
thisExpression{ nullptr },
|
|
body{ nullptr },
|
|
body{ nullptr },
|
|
|
|
+ isExtern{ isExtern },
|
|
scope{ parentScope, this }
|
|
scope{ parentScope, this }
|
|
{
|
|
{
|
|
}
|
|
}
|
|
@@ -174,11 +176,12 @@ struct qlow::sem::Method : public SemanticObject
|
|
inline Method(ast::MethodDefinition* astNode, Scope& parentScope) :
|
|
inline Method(ast::MethodDefinition* astNode, Scope& parentScope) :
|
|
SemanticObject{ parentScope.getContext() },
|
|
SemanticObject{ parentScope.getContext() },
|
|
containingClass{ nullptr },
|
|
containingClass{ nullptr },
|
|
- returnType{ parentScope.getReturnableType()},
|
|
|
|
|
|
+ returnType{ parentScope.getReturnableType() },
|
|
name{ astNode->name },
|
|
name{ astNode->name },
|
|
astNode{ astNode },
|
|
astNode{ astNode },
|
|
thisExpression{ nullptr },
|
|
thisExpression{ nullptr },
|
|
body{ nullptr },
|
|
body{ nullptr },
|
|
|
|
+ isExtern{ astNode->isExtern() },
|
|
scope{ parentScope, this }
|
|
scope{ parentScope, this }
|
|
{
|
|
{
|
|
}
|
|
}
|