This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
This PR fixes several issues with number matching. (See #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 #89