From f5246db6d045ffb86d6717e1b1c37f03bcb2b75b Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 10:30:02 +0000 Subject: feat(parser): parse OVERLOAD prefix on FUNCTION and PROCEDURE Co-Authored-By: Claude Opus 5.5 --- lib/Parser/ParserFunction.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/Parser/ParserFunction.cc') diff --git a/lib/Parser/ParserFunction.cc b/lib/Parser/ParserFunction.cc index fa46dcf..3df324c 100644 --- a/lib/Parser/ParserFunction.cc +++ b/lib/Parser/ParserFunction.cc @@ -130,7 +130,7 @@ std::optional> Parser::ParsePrototypeArgs(bool AllowByRef return Params; } -std::unique_ptr Parser::ParseFunction(const std::string &OwnerClass, bool IsPublic) { +std::unique_ptr Parser::ParseFunction(const std::string &OwnerClass, bool IsPublic, bool IsOverload) { int Line = Lex.getLine(); getNextToken(); if (CurTok == tok_delete || (CurTok == tok_identifier && sameIdentifier(Lex.IdentifierStr, "DELETE"))) { @@ -167,7 +167,7 @@ std::unique_ptr Parser::ParseFunction(const std::string &OwnerCl } } - auto Proto = std::make_unique(Name, std::move(*Args), RetType, false, OwnerClass, IsPublic); + auto Proto = std::make_unique(Name, std::move(*Args), RetType, false, OwnerClass, IsPublic, IsOverload); std::vector> Body = ParseBlock({tok_endfunction}); @@ -182,7 +182,7 @@ std::unique_ptr Parser::ParseFunction(const std::string &OwnerCl return Def; } -std::unique_ptr Parser::ParseProcedure(const std::string &OwnerClass, bool IsPublic) { +std::unique_ptr Parser::ParseProcedure(const std::string &OwnerClass, bool IsPublic, bool IsOverload) { int Line = Lex.getLine(); getNextToken(); if (CurTok != tok_identifier && CurTok != tok_new && CurTok != tok_delete) { @@ -207,7 +207,7 @@ std::unique_ptr Parser::ParseProcedure(const std::string &OwnerC cps::sourceDiagnostic(Lex.getLine(), "error: destructor DELETE must have no parameters at line %d\n", Line); return nullptr; } - auto Proto = std::make_unique(Name, std::move(*Args), "VOID", false, OwnerClass, IsPublic); + auto Proto = std::make_unique(Name, std::move(*Args), "VOID", false, OwnerClass, IsPublic, IsOverload); std::vector> Body = ParseBlock({tok_endprocedure}); -- cgit v1.3.1-4-g156e