atom-language-rust
atom-language-rust copied to clipboard
Lex Type, Identifiers in additional contexts
So I've made a couple enhancements that noticeably improve syntax highlighting, particularly for VSCode:
- Modified the
type
rule to match only those lexemes which start with an ASCII capital letter (e.g.Vertex
but notvertex
,PartialEq
but notpartialEq
). - Added an
identifier
rule which accepts everything thattype
used to accept, but is matched later so as not to conflict - Allow
type
s andidentifier
s to be matched inattribute
s, function definitions, and elsewhere (not otherwise specified)
Hope this is cool.