mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: fix float_test.v
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user