Skip to content

fix: highlight type parameters in constant declarations#218

Merged
mszabo-wikia merged 2 commits intomasterfrom
fix-const-type-param-highlight
Mar 31, 2026
Merged

fix: highlight type parameters in constant declarations#218
mszabo-wikia merged 2 commits intomasterfrom
fix-const-type-param-highlight

Conversation

@mszabo-wikia
Copy link
Copy Markdown
Contributor

Type parameters like vec<int> in top-level and class constant declarations were incorrectly highlighted as comparison operators. Fix by adding a dedicated const declaration grammar rule that includes #type-annotation, and reordering type-annotation patterns so generics (Name<...>) are matched before primitive type keywords.

Fixes #91, fixes #74.

Before

Screenshot 2026-03-31 at 18 32 23

After

Screenshot 2026-03-31 at 18 31 10

mszabo-wikia and others added 2 commits March 31, 2026 16:31
Type parameters like `vec<int>` in top-level and class constant
declarations were incorrectly highlighted as comparison operators.
Fix by adding a dedicated `const` declaration grammar rule that
includes `#type-annotation`, and reordering `type-annotation` patterns
so generics (`Name<...>`) are matched before primitive type keywords.

Fixes #91, fixes #74.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@mszabo-wikia mszabo-wikia merged commit 40114cd into master Mar 31, 2026
5 checks passed
@mszabo-wikia mszabo-wikia deleted the fix-const-type-param-highlight branch March 31, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants