From 39661855c0816ac248be437704c76f58359cb5f0 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 06:52:23 +0000 Subject: feat(classes): construct declared objects and nested fields and arrays Co-Authored-By: Claude Opus 5.5 --- include/cps/AST.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include/cps/AST.h') diff --git a/include/cps/AST.h b/include/cps/AST.h index c7764c6..c2754a5 100644 --- a/include/cps/AST.h +++ b/include/cps/AST.h @@ -125,9 +125,14 @@ public: class DeclareStmtAST : public StmtAST { std::string Name; std::string Type; + std::vector> Args; + bool HasParens; public: - DeclareStmtAST(const std::string &Name, const std::string &Type = "INTEGER") - : Name(Name), Type(Type) {} + DeclareStmtAST(const std::string &Name, const std::string &Type = "INTEGER", + std::vector> Args = {}, bool HasParens = false) + : Name(Name), Type(Type), Args(std::move(Args)), HasParens(HasParens) {} + const auto &getArgs() const { return Args; } + bool hasParens() const { return HasParens; } const std::string &getName() const { return Name; } const std::string &getType() const { return Type; } }; -- cgit v1.3.1-4-g156e