atom / language-clojure

Clojure package for Atom
Other
49 stars 48 forks source link

Update symbol grammar #69

Closed moxaj closed 6 years ago

moxaj commented 7 years ago

Description of the Change

See the spec:

Symbols begin with a non-numeric character <...> Symbols beginning or ending with ':' are reserved by Clojure <...>

This PR changes the grammar associated with symbols, disallowing leading digits and colons, and also allowing single-character symbols.

Alternate Designs

No alternatives were considered, the change seems straightforward.

Benefits

This fixes a highlighting issue when a keyword/number following a def* symbol would be highlighted as a symbol (entity.global.clojure) (see #62).

Possible Drawbacks

None that I can think of.

Applicable Issues

62

moxaj commented 7 years ago

Edited the description to reflect the changes made in the second commit.

50Wliu commented 7 years ago

Would you mind adding a spec for this please?

moxaj commented 7 years ago

@50Wliu any ETA on this?

bjonica commented 6 years ago

I would love to see this merged. Not recognizing single-character symbols makes syntax coloring look really messy.

lee-dohm commented 6 years ago

@50Wliu if you're cool with this change, we are.