diff --git a/src/game/data/block.cpp b/src/game/data/block.cpp index a46cb35..8dc625e 100644 --- a/src/game/data/block.cpp +++ b/src/game/data/block.cpp @@ -93,9 +93,7 @@ Block snapshot(const mars::parse::Node& node) { b.attrs.push_back(std::move(a)); break; } - case Entry::Kind::Item: - b.items.push_back(e.value); - break; + // (bare quoted items are now Pair entries with key_quoted; engine-parity change) case Entry::Kind::Block: { Block sub = snapshot(*e.block); sub.name = e.key; diff --git a/tests/game_data/test_weapon.cpp b/tests/game_data/test_weapon.cpp index 38f7f8a..dcdf537 100644 --- a/tests/game_data/test_weapon.cpp +++ b/tests/game_data/test_weapon.cpp @@ -155,9 +155,13 @@ TEST(weapon_no_block_is_fatal) { } TEST(weapon_syntax_error_is_fatal_and_recovery_is_reported) { + // Engine parity: an unterminated quote is NOT fatal -- the string runs to EOF (swallowing the + // '}') and EOF closes the block; the recovery is reported as a Syntax-kind problem. auto bad = parse_weapon("weapon { name \"unterminated }"); - CHECK(!bad.ok()); - CHECK(bad.problems[0].kind == Problem::Kind::Syntax); + CHECK(bad.ok()); + bool reported = false; + for (const auto& p : bad.problems) if (p.kind == Problem::Kind::Syntax) reported = true; + CHECK(reported); auto rec = parse_weapon("weapon { name @W weaponclass bullet turretsize small turretclass standard\n"); // EOF closes CHECK(rec.ok()); CHECK_EQ(rec.problems.size(), std::size_t{1});