You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unify directive punctuation, keyword, and parent into one highlight tag
Previously '&НаКлиенте' rendered as two adjacent spans (yellow '&' from
Annotation/"&" → t.annotation, but red 'НаКлиенте' because the global
'Identifier: t.variableName' won over 'Annotation/AnnotationName' at the
leaf level — @lezer/highlight resolves leaf tags first, ignoring parent
matches that didn't reach down to the leaf). Same problem with every
preprocessor directive: the wrapper tag never reached the inner keyword.
Fix:
- AnnotationName/Identifier now also tagged t.annotation so the leaf
Identifier inherits the annotation colour and 'НаКлиенте' merges into
the same span as '&'.
- Preprocessor mapping rewritten per bsl-language-server semantics:
Namespace bucket (Region, EndRegion, PreprocUseDirective + their '#'
and inner keyword) so '#Область' renders as one yellow block;
Macro bucket (PreprocessorIf/Elsif/Else/EndIf, PreprocessorDelete/
EndDelete/Insert/EndInsert, PreprocNativeDirective + their '#' and
inner BSL-keyword surfaces) so '#Если' renders as one coral block.
- Single-quoted keys in JS used so the literal '"&"' / '"#"' path
syntax — required by @lezer/highlight to reference non-identifier-
shaped tokens in path positions — is unambiguous.
Verified by inspecting prod DOM: CodeMirror's adjacent-span merging
turns each directive into a single coloured run.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments