Skip to content

Commit ca14262

Browse files
committed
[FIX] Fix string.HexNumber
1 parent 07a86c9 commit ca14262

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
# v0.0.9
4+
* Fix `string.HexNumber`
5+
36
# v0.0.8
47
* Add parsers to the extra package:
58
* `AsciiIdentifierStr`

string/parsers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ func HexNumber() ParserFn {
478478
}
479479
s := string(ch)
480480

481-
if '0' <= ch && ch <= '7' || 'A' <= ch && ch <= 'F' || 'a' <= ch && ch <= 'f' {
481+
if '0' <= ch && ch <= '9' || 'A' <= ch && ch <= 'F' || 'a' <= ch && ch <= 'f' {
482482
ctx.AstStack = append(ctx.AstStack, Ast{
483483
ClassName: ClassName,
484484
Type: AstType_String,

0 commit comments

Comments
 (0)