This PR updates the grammar to handle various new language features which we've added. It's not perfect (The & in &mut doesn't get highlighted for some reason) but it's a big improvement over the current.
Changes:
hex numbers now get consistently marked as a numeric literal rather than the letters remaining white.
impl, trait, type, unconstrained, distinct, pub, mut and self are marked as keywords.
true and false are now displayed as constants rather than as keywords.
removed the Witness type as it does not exist.
Additional Context
PR Checklist*
[x] I have tested the changes locally.
[x] I have formatted the changes with Prettier and/or cargo fmt on default settings.
BEGIN_COMMIT_OVERRIDE
feat: Update language grammar (#46)
END_COMMIT_OVERRIDE
Description
Problem*
Resolves
Summary*
This PR updates the grammar to handle various new language features which we've added. It's not perfect (The
&
in&mut
doesn't get highlighted for some reason) but it's a big improvement over the current.Changes:
impl
,trait
,type
,unconstrained
,distinct
,pub
,mut
andself
are marked as keywords.true
andfalse
are now displayed as constants rather than as keywords.Witness
type as it does not exist.Additional Context
PR Checklist*
cargo fmt
on default settings.BEGIN_COMMIT_OVERRIDE feat: Update language grammar (#46) END_COMMIT_OVERRIDE