NewNumberStr is a little weird in that this Node accepts string @text and uses go to parse into Int, AND Float.
(text string)
| 670 | // NewNumberStr is a little weird in that this Node accepts string @text |
| 671 | // and uses go to parse into Int, AND Float. |
| 672 | func NewNumberStr(text string) (*NumberNode, error) { |
| 673 | n := &NumberNode{Text: text} |
| 674 | return n, n.load() |
| 675 | } |
| 676 | func NewNumber(fv float64) (*NumberNode, error) { |
| 677 | n := &NumberNode{Float64: fv, IsFloat: true} |
| 678 | iv := int64(fv) |