aboutsummaryrefslogtreecommitdiff
path: root/lib/Parser/ParserFunction.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Parser/ParserFunction.cc')
-rw-r--r--lib/Parser/ParserFunction.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Parser/ParserFunction.cc b/lib/Parser/ParserFunction.cc
index dfb689a..65e0b85 100644
--- a/lib/Parser/ParserFunction.cc
+++ b/lib/Parser/ParserFunction.cc
@@ -374,6 +374,12 @@ std::unique_ptr<StmtAST> Parser::ParseCallStmt() {
Args = std::move(*Parsed);
}
+ if (CurTok == '.') {
+ auto Result = ParseResultMethods(std::make_unique<CallExprAST>(Callee, std::move(Args), Line), Line);
+ if (!Result) return nullptr;
+ return std::make_unique<MemberCallStmtAST>(
+ std::unique_ptr<MemberCallExprAST>(static_cast<MemberCallExprAST *>(Result.release())));
+ }
return std::make_unique<CallStmtAST>(Callee, std::move(Args), Line);
}