mirror of
https://github.com/MontFerret/ferret.git
synced 2025-07-15 01:25:00 +02:00
New type system (#232)
* New type system * Fixed dot notation for HTML elements
This commit is contained in:
@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values/types"
|
||||
)
|
||||
|
||||
// Ceil returns the least integer value greater than or equal to a given value.
|
||||
@ -18,7 +19,7 @@ func Ceil(_ context.Context, args ...core.Value) (core.Value, error) {
|
||||
return values.None, err
|
||||
}
|
||||
|
||||
err = core.ValidateType(args[0], core.IntType, core.FloatType)
|
||||
err = core.ValidateType(args[0], types.Int, types.Float)
|
||||
|
||||
if err != nil {
|
||||
return values.None, err
|
||||
|
Reference in New Issue
Block a user