From 0798836375047a051ad4bffa500e8e819fd51c5e Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 03:36:25 +0000 Subject: refactor(codegen): extract FunctionGen prototype validation Move the copy-constructor, operator, MAIN OVERLOAD and reserved, builtin, enum and type name checks at the start of emitPrototype into a private validatePrototype helper. Co-Authored-By: Claude Opus 5.5 --- include/cps/FunctionGen.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/cps/FunctionGen.h b/include/cps/FunctionGen.h index 95579c4..1b4a07a 100644 --- a/include/cps/FunctionGen.h +++ b/include/cps/FunctionGen.h @@ -86,6 +86,7 @@ private: void createArgumentAllocas(llvm::Function *F, const std::vector &Params, bool IsMethod); llvm::Type *getLLVMType(const std::string &TypeName); + bool validatePrototype(PrototypeAST *Proto); llvm::Value *emitCall(const std::string &Callee, const std::vector &Args); public: -- cgit v1.3.1-4-g156e