diff --git a/node.go b/node.go index c49d2bf..638f974 100644 --- a/node.go +++ b/node.go @@ -1585,6 +1585,11 @@ func (this *conversionState) convertNoFreeFloating(n_ node.Node) (string, error) // 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 case *scalar.String: