From 56e97d0ddd3fff2bee160bae04e8f659671f398d Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 03:55:22 +0000 Subject: refactor(parser): share the designator degrade rule for INPUT and expressions INPUT targets and identifier expressions now build their legacy VariableExprAST/ArrayAccessExprAST/DesignatorExprAST node through makeDesignator(). INPUT still sets the target line explicitly. Co-Authored-By: Claude Opus 5.5 --- include/cps/Parser.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/cps/Parser.h') diff --git a/include/cps/Parser.h b/include/cps/Parser.h index cf27234..c9fe186 100644 --- a/include/cps/Parser.h +++ b/include/cps/Parser.h @@ -78,6 +78,8 @@ class Parser { std::unique_ptr ParseConstant(); std::unique_ptr ParseAssignStmt(); bool ParseDesignatorSuffix(std::vector &Out); + static std::unique_ptr makeDesignator( + const std::string &Name, std::vector Accesses, int Line); std::unique_ptr ParseTypeDecl(); std::unique_ptr ParseTemplateDecl(); -- cgit v1.3.1-4-g156e