directive-split: recover conditional-split constructs as verbatim items
An `ifdef/`else region whose arms are each an incomplete fragment of one declaration (alternative heads sharing a body; alternative struct bodies sharing a closing) no longer refuses: the strict parser recovers the whole construct as a verbatim item, exact source bytes, the constraint/covergroup precedent. The trigger requires an unmatched open bracket inside a region genuinely open at item scope — `Parser::open_conds` counts only at the single ItemKind::Directive producer, so opaque verbatim walks cannot perturb it, and a recovered block hands back the nesting it swallows. Corpus: 800 -> 813 / 820 (97.6% -> 99.1%), +13 files (12x riscv_core_setting.sv, riscv_instr_pkg.sv), pass set a strict superset. verify.rs untouched. Three dev passes, two adversarial QA rejections (stray-`endif laundering; open_conds pollution via opaque bodies), QA round 5 PASS. 26+12 new tests; workspace 1672 passed / 0 failed. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
22cfa91732
commit
b77b61e7de
4 files changed
+2297
-2
No files matched your search
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user