aboutsummaryrefslogtreecommitdiff
path: root/include/cps/AST.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cps/AST.h')
-rw-r--r--include/cps/AST.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/cps/AST.h b/include/cps/AST.h
index 87c9341..1afc359 100644
--- a/include/cps/AST.h
+++ b/include/cps/AST.h
@@ -105,6 +105,16 @@ public:
class ThrowStmtAST : public StmtAST {};
+class ConstantStmtAST : public StmtAST {
+ std::string Name;
+ std::unique_ptr<ExprAST> Value;
+public:
+ ConstantStmtAST(std::string Name, std::unique_ptr<ExprAST> Value)
+ : Name(std::move(Name)), Value(std::move(Value)) {}
+ const std::string &getName() const { return Name; }
+ ExprAST *getValue() const { return Value.get(); }
+};
+
class DeclareStmtAST : public StmtAST {
std::string Name;
std::string Type;