diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-22 04:00:38 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-22 04:05:51 +0000 |
| commit | 0b763257ed1e230767171234971cc8f660d59087 (patch) | |
| tree | 61287515873b94ab4eeccf608447c39019d7ba25 /include | |
| parent | 56e97d0ddd3fff2bee160bae04e8f659671f398d (diff) | |
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 <noreply@anthropic.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/cps/Parser.h | 3 |
1 files changed, 3 insertions, 0 deletions
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<ExprAST> ParseParenExpr(); + bool ParseOptionalCallArgs(std::vector<std::unique_ptr<ExprAST>> &Args); + bool diagnoseResultAccess(); + static bool isBuiltinTypeToken(int Tok); std::unique_ptr<MemberCallExprAST> ParseMemberCall( const std::string &Name, std::vector<DesignatorAccess> Accesses, int Line); std::string ParseTypeName(bool AllowVoid = false); |
