Commit bae6620
committed
scope≡role: catch a structural literal painted as a NAME (extends gate-1)
gate-1 flagged a `$punct`/`$keyword` painted as CONTENT (#24). Extend it to also
flag a `$punct` painted as a NAME bucket (entity/variable/support): a `-`/`[`/`:` is
never a named entity, so a flat grammar that leaks a flow region into a block and
paints a sequence `-` as a key name (monogram's YAML explicit-key gap) is caught.
`$keyword` is EXCLUDED from the name class — a keyword legitimately can be a name in
context (the TS `this` parameter is `variable.parameter`), which would false-positive;
content (never valid for a keyword) still flags both. The overlap check already clears
any literal the grammar DECLARES name/content via a scopes-override, so reaching here
means the highlighter invented the class.
Also fix a ledger/check corpus mismatch: gap-ledger.ts generated with the DEFAULT
opts (maxInputs 400) while generative.ts uses GEN_OPTS (1500) — so the ledger could
miss divergences the check reports. The ledger now uses GEN_OPTS (the same corpus).
KNOWN-GAPS.md: 2→3 gaps — the YAML explicit-key divergence now files, ddmin-minimized
to `? a:\n -` (the `[` was incidental; the real trigger is an explicit-key value's
same-column sequence `-` painted entity.name.tag). 7/7 gated-clean (no $keyword false
positive); deterministic; --check + selftest + agnostic 9/9 green.1 parent 437a5ea commit bae6620
3 files changed
Lines changed: 37 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
18 | 40 | | |
19 | 41 | | |
20 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
156 | 161 | | |
157 | | - | |
158 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
159 | 169 | | |
160 | 170 | | |
161 | 171 | | |
| |||
0 commit comments