Don't consume token on invalid entity typename #5504

This commit is contained in:
Thomas Krijnen
2024-09-29 19:15:18 +02:00
parent 8a0e87b8f8
commit 2c22421889
+1 -1
View File
@@ -715,10 +715,10 @@ void IfcParse::IfcFile::load(unsigned entity_instance_name, const IfcParse::enti
if (TokenFunc::isKeyword(next)) {
try {
const auto* decl = schema_->declaration_by_name(TokenFunc::asStringRef(next));
parse_context ps;
tokens->Next();
load(0, nullptr, ps, -1);
const auto *decl = schema_->declaration_by_name(TokenFunc::asStringRef(next));
auto* simple_type_instance = schema_->instantiate(decl, ps.construct(-1, references_to_resolve, decl, boost::none));
//@todo decide addEntity(((IfcUtil::IfcBaseClass*)*entity));
context.push(simple_type_instance);