From 59a2bb6acb975d820ab29be63a6f909d6e6ef40f Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 09:09:54 +0000 Subject: feat(parser): parse INCLUDE and GLOBAL blocks Co-Authored-By: Claude Opus 5.5 --- include/cps/AST.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/cps/AST.h') diff --git a/include/cps/AST.h b/include/cps/AST.h index f20b106..8c8c3be 100644 --- a/include/cps/AST.h +++ b/include/cps/AST.h @@ -100,6 +100,21 @@ public: virtual ~StmtAST() = default; }; +class IncludeStmtAST : public StmtAST { + std::string Path; +public: + explicit IncludeStmtAST(std::string Path) : Path(std::move(Path)) {} + const std::string &getPath() const { return Path; } +}; + +class GlobalBlockAST : public StmtAST { + std::vector> Body; +public: + explicit GlobalBlockAST(std::vector> Body) + : Body(std::move(Body)) {} + const auto &getBody() const { return Body; } +}; + class TryStmtAST : public StmtAST { std::vector> Body, CatchBody; public: -- cgit v1.3.1-4-g156e