From d4af7f50594737b638bccdf84de95b51322f6025 Mon Sep 17 00:00:00 2001 From: Sam Vervaeck Date: Thu, 11 Jul 2024 10:08:25 +0200 Subject: [PATCH] Add some extra methods to MatchExpression --- include/bolt/CST.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/bolt/CST.hpp b/include/bolt/CST.hpp index f36209a90..01713a539 100644 --- a/include/bolt/CST.hpp +++ b/include/bolt/CST.hpp @@ -1873,6 +1873,14 @@ public: Token* getFirstToken() const override; Token* getLastToken() const override; + inline bool hasValue() const { + return Value; + } + + Expression* getValue() const { + return Value; + } + static constexpr const NodeKind Kind = NodeKind::MatchExpression; };