1
0
mirror of synced 2024-11-25 00:00:27 +01:00

Fixed enums failing to validate

This commit is contained in:
WerWolv 2020-11-22 02:25:03 +01:00
parent 0ce1b5d40b
commit 033ef3889a

View File

@ -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<ASTNodeVariableDecl*>(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;
}
}