summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCpp/AST.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibCpp/AST.h')
-rw-r--r--Userland/Libraries/LibCpp/AST.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCpp/AST.h b/Userland/Libraries/LibCpp/AST.h
index 537ab5509c..f5a6d11eaf 100644
--- a/Userland/Libraries/LibCpp/AST.h
+++ b/Userland/Libraries/LibCpp/AST.h
@@ -124,6 +124,7 @@ public:
virtual bool is_class() const { return false; }
virtual bool is_function() const { return false; }
virtual bool is_namespace() const { return false; }
+ virtual bool is_enum() const { return false; }
bool is_member() const { return parent() != nullptr && parent()->is_declaration() && verify_cast<Declaration>(parent())->is_struct_or_class(); }
const Name* name() const { return m_name; }
StringView full_name() const;
@@ -655,6 +656,7 @@ public:
virtual ~EnumDeclaration() override = default;
virtual const char* class_name() const override { return "EnumDeclaration"; }
virtual void dump(FILE* = stdout, size_t indent = 0) const override;
+ virtual bool is_enum() const override { return true; }
EnumDeclaration(ASTNode* parent, Optional<Position> start, Optional<Position> end, const String& filename)
: Declaration(parent, start, end, filename)