core/asm: fix hex number lexing (#14861)

This commit is contained in:
njupt-moon
2017-07-31 19:02:36 +08:00
committed by Felix Lange
parent bdf98b4fcd
commit 53f3460ab5
2 changed files with 41 additions and 6 deletions

View File

@ -254,7 +254,7 @@ func lexInsideString(l *lexer) stateFn {
func lexNumber(l *lexer) stateFn {
acceptance := Numbers
if l.accept("0") && l.accept("xX") {
if l.accept("0") || l.accept("xX") {
acceptance = HexadecimalNumbers
}
l.acceptRun(acceptance)