parser: fix number parse error
parent
84ac634c31
commit
67cd90de6e
|
@ -869,7 +869,7 @@ fn (var p Parser) parse_number_literal() ast.Expr {
|
||||||
lit := p.tok.lit
|
lit := p.tok.lit
|
||||||
pos := p.tok.position()
|
pos := p.tok.position()
|
||||||
var node := ast.Expr{}
|
var node := ast.Expr{}
|
||||||
if lit.index_any('.eE') >= 0 {
|
if lit.index_any('.eE') >= 0 && lit[..2] !in ['0x', '0X', '0o', '0O', '0b', '0B'] {
|
||||||
node = ast.FloatLiteral{
|
node = ast.FloatLiteral{
|
||||||
val: lit
|
val: lit
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue