Closed lugray closed 4 months ago
Changes to minified artifacts in /build
, after gzip compression.
Total change +187 B
Also any reason we can't group the two octal rules together?
Defining the two together before defining decimals caused us to match the beginnings of what should be matched as decimal/complex floats such as 0.
, 0.15e+0_2
, and 0.i
, and excludes as a number the decimal component.
Defining the two together after defining decimals caused 0o...
style octals to get matched as a 0
decimal number, leaving the o...
unhighlighted.
But writing this out made me realize that we don't ever actually match an octal without the [oO]
as an octal. To the regex, it looks like a decimal. So we can drop the second octal rule.
Changes to minified artifacts in /build
, after gzip compression.
Total change +201 B
Changes to minified artifacts in /build
, after gzip compression.
Total change +101 B
Changes to minified artifacts in /build
, after gzip compression.
Total change +208 B
Go number literals are considerably more complex than previously expressed. Most notable,
_
is allowed in several contexts to allow digit grouping, hex numbers can takep
exponents, and a number with a radix (.
) requires digits before or after but not both. The additional test cases were pulled from https://go.dev/ref/spec.Changes
Add test cases from https://go.dev/ref/spec, and make the tests pass.
Checklist
CHANGES.md