TODO §50 (docs/features/expand-wildcard), the first §8 refactoring. `vlog_refactor::expand_wildcard` (ports/expand.rs): at the cursor's instantiation, every port not explicitly connected becomes `.p(p)` when a same-named net, variable or port is declared in the instance's scope (generate block → parents → module; IEEE 1800 §23.3.2.4 read strictly — a parameter, genvar, type, instance or tf argument does not bind) and `.p()` plus a warning otherwise, in declaration order, replacing the `.*` element through the ports engine's splice and verifier. Refusals: no `.*`, two, a positional list, a `bind` directive, a multi-instance statement, a parse diagnostic in either file, compiler directives in either list, an unknown or twice-declared module, and a `.*` that binds nothing. Server: the lazy code action `lucisv: expand .* (N connections)` and the command `lucisv.expandWildcard`; a title-rewrite bug in the lazy offer path (`counted`) fixed on the way. Corpus: 11 of 21 sites expand (the rest refused honestly); opentitan `hw/`: 9 of 66 (50 are `bind`), each verified, two surfacing real FPV-wrapper drift. 0 of 854 corpus files differ. Dev-dependency vlog_refactor → vlog_formatter (tests). Co-Authored-By: Claude Fable 5.1 <[email protected]>
19 lines
686 B
TOML
19 lines
686 B
TOML
[package]
|
|
name = "vlog_refactor"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "Refactorings for Verilog/SystemVerilog, computed from resolved references"
|
|
|
|
[dependencies]
|
|
vlog_parser = { path = "../vlog_parser" }
|
|
vlog_semantic = { path = "../vlog_semantic" }
|
|
|
|
[dev-dependencies]
|
|
# Tests only, the same arrangement `vlog_linter` uses: the `.*` expansion's
|
|
# acceptance test asserts that what the refactoring writes is something the
|
|
# formatter accepts and leaves alone the second time. The library still
|
|
# depends on vlog_parser + vlog_semantic alone
|
|
# (`cargo tree -p vlog_refactor -e normal`).
|
|
vlog_formatter = { path = "../vlog_formatter" }
|