Closed MrEbbinghaus closed 2 years ago
These changes were merged into the Calva Clojure IDE. https://github.com/BetterThanTomorrow/calva/pull/1435
@kevinsawicki @50Wliu
Hey, is this repository still maintained or is it abandoned? If it is abandoned, where can I report and fix parsing/highlighting issues to?
Hey! @darangi and @sadick254 would be the two best equipped to answer that, I think. Let me look at this PR though and see if I have any comments.
Thanks for the contribution 🙇🏾 @MrEbbinghaus
Description of the Change
This PR fixes several issues with number matching. (See https://github.com/atom/language-clojure/issues/89)
+
prefix.N
, that includes octals, hexadecimals and arbitrary radixconstant.numeric.bigint.clojure
intoconstant.numeric.long.clojure
as it doesn't make any sense any more, to have it separate.constant.numeric.bigdecimal.clojure
intoconstant.numeric.double.clojure
for consistency..
is optional when followed bye
,E
,M
\w
also matches_
which is incorrect.2rABZ
) shouldn't be matched either, but I considered it overkill.8
or9
It also adds a bunch of tests to check for previously missed cases.
Alternate Designs
I considered constraining the changes to only eliminate false-negatives. (Change 5 and 6 are only fixing false-positives) I opted against that because a more strict highlighting is the fastest way of feedback a developer can get.
Benefits
More accurate highlighting of numbers.
Possible Drawbacks
The matching is more strict. Some false-positives aren't highlighted any more. (Although not really a drawback, it is a breaking change if someone relies on current bugs... But, how would?)
Applicable Issues
resolves https://github.com/atom/language-clojure/issues/89