1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-11-29 22:17:29 +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

@@ -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"
)
// Substitute replaces search values in the string value.
@@ -31,7 +32,7 @@ func Substitute(_ context.Context, args ...core.Value) (core.Value, error) {
}
if len(args) > 3 {
if args[3].Type() == core.IntType {
if args[3].Type() == types.Int {
limit = int(args[3].(values.Int))
}
}