Commit 0851417
committed
feat: resolve SPICE parametric expressions and sanitize numeric node names
Gap 12: Build a .param lookup table with multi-pass chained resolution so
parameter references (e.g. `.param tstep=1n` used in `.tran tstep ...`) and
brace expressions (`{Rval}`) resolve to concrete values during import.
Gap 23: Prefix `n` to digit-leading SPICE node names (e.g. `1` → `n1`) so
they form valid Cirq identifiers while preserving net identity.
Adds 6 new test cases covering param resolution, brace expressions,
chained params, and node name sanitization.1 parent 3d676f5 commit 0851417
3 files changed
Lines changed: 362 additions & 93 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | | - | |
| 218 | + | |
220 | 219 | | |
221 | 220 | | |
222 | 221 | | |
| |||
537 | 536 | | |
538 | 537 | | |
539 | 538 | | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | | - | |
546 | | - | |
547 | | - | |
| 539 | + | |
| 540 | + | |
548 | 541 | | |
549 | 542 | | |
550 | 543 | | |
| |||
687 | 680 | | |
688 | 681 | | |
689 | 682 | | |
690 | | - | |
691 | | - | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
692 | 691 | | |
693 | 692 | | |
694 | 693 | | |
| |||
0 commit comments