From 033ef3889ac1b55afe297a8f0a558922746452df Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 22 Nov 2020 02:25:03 +0100 Subject: [PATCH] Fixed enums failing to validate --- source/lang/validator.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/lang/validator.cpp b/source/lang/validator.cpp index 018df4cd5..498bcbb80 100644 --- a/source/lang/validator.cpp +++ b/source/lang/validator.cpp @@ -37,7 +37,7 @@ namespace hex::lang { if (typeDeclNode->getAssignedType() == Token::TypeToken::Type::CustomType && !typeNames.contains(typeDeclNode->getAssignedCustomTypeName())) return false; } - break; + break; case ASTNode::Type::Struct: { // Check for duplicate type name @@ -51,7 +51,7 @@ namespace hex::lang { if (!memberNames.insert(static_cast(member)->getVariableName()).second) return false; } - break; + break; case ASTNode::Type::Enum: { // Check for duplicate type name @@ -65,6 +65,7 @@ namespace hex::lang { if (!constantNames.insert(name).second) return false; } + break; case ASTNode::Type::Bitfield: { // Check for duplicate type name @@ -86,7 +87,7 @@ namespace hex::lang { if (bitfieldSize > 64) return false; } - break; + break; } }