mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-14 08:47:57 -05:00
Calculate size and alignment in post processor
This commit is contained in:
@ -17,4 +17,14 @@ SequenceUse::SequenceUse()
|
||||
|
||||
void SequenceUse::ProcessMatch(CommandsParserState* state, SequenceResult<CommandsParserValue>& result) const
|
||||
{
|
||||
const auto& typeNameToken = result.NextCapture(CAPTURE_TYPE);
|
||||
auto* definition = state->GetRepository()->GetDataDefinitionByName(typeNameToken.TypeNameValue());
|
||||
if (definition == nullptr)
|
||||
throw ParsingException(typeNameToken.GetPos(), "Unknown type");
|
||||
|
||||
auto* definitionWithMembers = dynamic_cast<DefinitionWithMembers*>(definition);
|
||||
if (definitionWithMembers == nullptr)
|
||||
throw ParsingException(typeNameToken.GetPos(), "Type must be able to have members");
|
||||
|
||||
state->SetInUse(state->GetRepository()->GetInformationFor(definitionWithMembers));
|
||||
}
|
||||
|
Reference in New Issue
Block a user