diff --git a/vlib/v/parser/parser.v b/vlib/v/parser/parser.v index bc76a035b9..50a4c2fdb5 100644 --- a/vlib/v/parser/parser.v +++ b/vlib/v/parser/parser.v @@ -869,7 +869,7 @@ fn (var p Parser) parse_number_literal() ast.Expr { lit := p.tok.lit pos := p.tok.position() 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{ val: lit }