1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-07-05 00:49:00 +02:00

New type system (#232)

* New type system

* Fixed dot notation for HTML elements
This commit is contained in:
Tim Voronov
2019-02-13 12:31:18 -05:00
committed by GitHub
parent b3bcbda3b9
commit 1af8b37a0f
185 changed files with 1379 additions and 820 deletions

View File

@ -1,9 +1,11 @@
package math
import (
"math"
"github.com/MontFerret/ferret/pkg/runtime/core"
"github.com/MontFerret/ferret/pkg/runtime/values"
"math"
"github.com/MontFerret/ferret/pkg/runtime/values/types"
)
const (
@ -52,7 +54,7 @@ func NewLib() map[string]core.Function {
}
func toFloat(arg core.Value) float64 {
if arg.Type() == core.IntType {
if arg.Type() == types.Int {
return float64(arg.(values.Int))
}