Lexer no longer freaks out when parsing a 0
This commit is contained in:
parent
cc14292c63
commit
a665463932
@ -40,11 +40,11 @@ func (lexer *LexingOperation) tokenizeNumberBeginning (negative bool) (err error
|
|||||||
intNumber, floatNumber,
|
intNumber, floatNumber,
|
||||||
isFloat, amountRead,
|
isFloat, amountRead,
|
||||||
err = lexer.tokenizeNumber(8)
|
err = lexer.tokenizeNumber(8)
|
||||||
} else if lexer.char != ' ' { // a space should correctly
|
} else if lexer.char >= '8' && lexer.char <= '9' {
|
||||||
err = infoerr.NewError ( // terminate this
|
err = infoerr.NewError (
|
||||||
lexer.file.Location(1),
|
lexer.file.Location(1),
|
||||||
"unexpected rune '" + string(lexer.char) +
|
"unexpected number '" + string(lexer.char) +
|
||||||
"' in integer literal",
|
"' in octal literal",
|
||||||
infoerr.ErrorKindError)
|
infoerr.ErrorKindError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user