From 0b763257ed1e230767171234971cc8f660d59087 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 04:00:38 +0000 Subject: refactor(parser): share call-argument, result-access and type-token checks Add ParseOptionalCallArgs() for member calls and NEW, diagnoseResultAccess() for the duplicated "access on a function result" diagnostic, and isBuiltinTypeToken() for the builtin type keyword list used by template-call lookahead, cast detection and CASE label scanning. Co-Authored-By: Claude Opus 5.5 --- include/cps/Parser.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/cps/Parser.h b/include/cps/Parser.h index c9fe186..fbccb3c 100644 --- a/include/cps/Parser.h +++ b/include/cps/Parser.h @@ -49,6 +49,9 @@ class Parser { std::string ParseOperatorName(int *Op = nullptr); bool ParseCalleeName(std::string &Name); std::unique_ptr ParseParenExpr(); + bool ParseOptionalCallArgs(std::vector> &Args); + bool diagnoseResultAccess(); + static bool isBuiltinTypeToken(int Tok); std::unique_ptr ParseMemberCall( const std::string &Name, std::vector Accesses, int Line); std::string ParseTypeName(bool AllowVoid = false); -- cgit v1.3.1-4-g156e