parser: fix float_test.v
parent
d54150cd22
commit
9984691eaf
|
@ -1343,7 +1343,7 @@ fn (p mut Parser) map_init() ast.MapInit {
|
||||||
fn (p mut Parser) parse_number_literal() ast.Expr {
|
fn (p mut Parser) parse_number_literal() ast.Expr {
|
||||||
lit := p.tok.lit
|
lit := p.tok.lit
|
||||||
mut node := ast.Expr{}
|
mut node := ast.Expr{}
|
||||||
if lit.contains('.') {
|
if lit.index_any('.eE') >= 0 {
|
||||||
node = ast.FloatLiteral{
|
node = ast.FloatLiteral{
|
||||||
val: lit
|
val: lit
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue