node: implement float literals
This commit is contained in:
parent
9253058a73
commit
979049ae42
5
node.go
5
node.go
@ -1585,6 +1585,11 @@ func (this *conversionState) convertNoFreeFloating(n_ node.Node) (string, error)
|
|||||||
//
|
//
|
||||||
|
|
||||||
case *scalar.Lnumber:
|
case *scalar.Lnumber:
|
||||||
|
// Integer (maybe with 0b / 0x / '0' prefix)
|
||||||
|
return n.Value, nil // number formats are compatible
|
||||||
|
|
||||||
|
case *scalar.Dnumber:
|
||||||
|
// Float (maybe with period / scientific notation)
|
||||||
return n.Value, nil // number formats are compatible
|
return n.Value, nil // number formats are compatible
|
||||||
|
|
||||||
case *scalar.String:
|
case *scalar.String:
|
||||||
|
Loading…
Reference in New Issue
Block a user