We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1121f81 commit c8ca9e6Copy full SHA for c8ca9e6
1 file changed
lex.go
@@ -928,19 +928,9 @@ func lexLongUnicodeEscape(lx *lexer) stateFn {
928
// lexBaseNumberOrDate can differentiate base prefixed integers from other
929
// types.
930
func lexNumberOrDateStart(lx *lexer) stateFn {
931
- r := lx.next()
932
- switch r {
933
- case '0':
+ if lx.next() == '0' {
934
return lexBaseNumberOrDate
935
}
936
-
937
- if !isDigit(r) {
938
- // The only way to reach this state is if the value starts
939
- // with a digit, so specifically treat anything else as an
940
- // error.
941
- return lx.errorf("expected a digit but got %q", r)
942
- }
943
944
return lexNumberOrDate
945
946
0 commit comments