Commit f1423fe
SDBL: unify &/name colouring of query parameters + accept keyword-shaped names
Two related fixes for query parameters like '&НачалоПериода':
1. Grammar — the old 'Parameter { Ampersand Identifier }' rule rejected
any name that the @external specialize hook turned into a SDBL keyword
(e.g. 'началопериода' matches BEGINOFPERIOD in FuncKw). Real configs
use such names routinely. Replaced Identifier with an inlined
'sdblName' alternative that accepts Identifier OR any category-keyword
term, so the specializer never breaks parameter parsing.
2. styleTags — previously Parameter/Ampersand was t.modifier and
Parameter/Identifier was t.local(t.variableName), so '&Имя' rendered
in two different theme colours. Now every possible leaf inside
Parameter (Ampersand plus every category keyword that may appear as
the name) shares t.special(t.variableName) so the parameter renders
as one visual block — verified by inspecting the live demo's spans:
both '&' and 'НачалоПериода' end up in the same ͼ class.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent dce8d47 commit f1423fe
2 files changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
53 | 63 | | |
54 | 64 | | |
55 | 65 | | |
| |||
0 commit comments