fork: rename module to github.com/hanzoai/expr

This commit is contained in:
2026-06-30 17:34:46 -07:00
parent 0319ec768c
commit 1e8be921d2
119 changed files with 349 additions and 349 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ const exclude = [
cd(path.resolve(__dirname, '..', '..'))
await spinner('Running tests', async () => {
await $`go test -coverprofile=coverage.out -coverpkg=github.com/expr-lang/expr/... ./...`
await $`go test -coverprofile=coverage.out -coverpkg=github.com/hanzoai/expr/... ./...`
const coverage = fs.readFileSync('coverage.out').toString()
.split('\n')
.filter(line => {
+2 -2
View File
@@ -4,9 +4,9 @@ import (
"fmt"
"testing"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr"
"github.com/hanzoai/expr"
)
// TestUserDefinedStaticLabels tests examples from the User-Defined Static Labels section
+2 -2
View File
@@ -3,9 +3,9 @@ package ast_test
import (
"testing"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr/ast"
"github.com/hanzoai/expr/ast"
)
func TestFind(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package ast
import (
"reflect"
"github.com/expr-lang/expr/checker/nature"
"github.com/expr-lang/expr/file"
"github.com/hanzoai/expr/checker/nature"
"github.com/hanzoai/expr/file"
)
var (
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"fmt"
"strings"
"github.com/expr-lang/expr/parser/operator"
"github.com/expr-lang/expr/parser/utils"
"github.com/hanzoai/expr/parser/operator"
"github.com/hanzoai/expr/parser/utils"
)
func (n *NilNode) String() string {
+4 -4
View File
@@ -3,11 +3,11 @@ package ast_test
import (
"testing"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/parser"
"github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/parser"
)
func TestPrint(t *testing.T) {
+2 -2
View File
@@ -3,9 +3,9 @@ package ast_test
import (
"testing"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/expr-lang/expr/ast"
"github.com/hanzoai/expr/ast"
)
type visitor struct {
+3 -3
View File
@@ -3,10 +3,10 @@ package expr_test
import (
"testing"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/vm"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/vm"
)
func Benchmark_expr(b *testing.B) {
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"strings"
"time"
"github.com/expr-lang/expr/internal/deref"
"github.com/expr-lang/expr/vm/runtime"
"github.com/hanzoai/expr/internal/deref"
"github.com/hanzoai/expr/vm/runtime"
)
var (
+9 -9
View File
@@ -7,15 +7,15 @@ import (
"testing"
"time"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/builtin"
"github.com/expr-lang/expr/checker"
"github.com/expr-lang/expr/conf"
"github.com/expr-lang/expr/parser"
"github.com/expr-lang/expr/test/mock"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/builtin"
"github.com/hanzoai/expr/checker"
"github.com/hanzoai/expr/conf"
"github.com/hanzoai/expr/parser"
"github.com/hanzoai/expr/test/mock"
)
func TestBuiltin(t *testing.T) {
@@ -507,7 +507,7 @@ func TestBuiltin_type(t *testing.T) {
{func() {}, "func"},
{time.Now(), "time.Time"},
{time.Second, "time.Duration"},
{Foo{}, "github.com/expr-lang/expr/builtin_test.Foo"},
{Foo{}, "github.com/hanzoai/expr/builtin_test.Foo"},
{struct{}{}, "struct"},
{a, "int"},
}
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"strconv"
"unicode/utf8"
"github.com/expr-lang/expr/internal/deref"
"github.com/expr-lang/expr/vm/runtime"
"github.com/hanzoai/expr/internal/deref"
"github.com/hanzoai/expr/vm/runtime"
)
func Len(x any) any {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"reflect"
"time"
"github.com/expr-lang/expr/internal/deref"
"github.com/hanzoai/expr/internal/deref"
)
var (
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"fmt"
"reflect"
"github.com/expr-lang/expr/internal/deref"
"github.com/hanzoai/expr/internal/deref"
)
func validateAggregateFunc(name string, args []reflect.Type) (reflect.Type, error) {
+6 -6
View File
@@ -6,12 +6,12 @@ import (
"regexp"
"time"
"github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/builtin"
. "github.com/expr-lang/expr/checker/nature"
"github.com/expr-lang/expr/conf"
"github.com/expr-lang/expr/file"
"github.com/expr-lang/expr/parser"
"github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/builtin"
. "github.com/hanzoai/expr/checker/nature"
"github.com/hanzoai/expr/conf"
"github.com/hanzoai/expr/file"
"github.com/hanzoai/expr/parser"
)
var (
+6 -6
View File
@@ -4,12 +4,12 @@ import (
"runtime"
"testing"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/checker"
"github.com/expr-lang/expr/checker/nature"
"github.com/expr-lang/expr/conf"
"github.com/expr-lang/expr/parser"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/checker"
"github.com/hanzoai/expr/checker/nature"
"github.com/hanzoai/expr/conf"
"github.com/hanzoai/expr/parser"
)
func BenchmarkChecker(b *testing.B) {
+9 -9
View File
@@ -8,16 +8,16 @@ import (
"strings"
"testing"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/expr-lang/expr/types"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/hanzoai/expr/types"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/checker"
"github.com/expr-lang/expr/conf"
"github.com/expr-lang/expr/parser"
"github.com/expr-lang/expr/test/mock"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/checker"
"github.com/hanzoai/expr/conf"
"github.com/hanzoai/expr/parser"
"github.com/hanzoai/expr/test/mock"
)
func TestCheck(t *testing.T) {
+3 -3
View File
@@ -3,9 +3,9 @@ package checker
import (
"reflect"
"github.com/expr-lang/expr/ast"
. "github.com/expr-lang/expr/checker/nature"
"github.com/expr-lang/expr/vm"
"github.com/hanzoai/expr/ast"
. "github.com/hanzoai/expr/checker/nature"
"github.com/hanzoai/expr/vm"
)
func FieldIndex(c *Cache, env Nature, node ast.Node) (bool, []int, string) {
+3 -3
View File
@@ -5,10 +5,10 @@ import (
"testing"
"time"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr/checker"
"github.com/expr-lang/expr/test/mock"
"github.com/hanzoai/expr/checker"
"github.com/hanzoai/expr/test/mock"
)
func TestTypedFuncIndex(t *testing.T) {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"reflect"
"time"
"github.com/expr-lang/expr/builtin"
"github.com/expr-lang/expr/internal/deref"
"github.com/hanzoai/expr/builtin"
"github.com/hanzoai/expr/internal/deref"
)
var (
+1 -1
View File
@@ -3,7 +3,7 @@ package nature
import (
"reflect"
"github.com/expr-lang/expr/internal/deref"
"github.com/hanzoai/expr/internal/deref"
)
func fieldName(fieldName string, tag reflect.StructTag) (string, bool) {
+9 -9
View File
@@ -7,15 +7,15 @@ import (
"regexp"
"runtime/debug"
"github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/builtin"
"github.com/expr-lang/expr/checker"
. "github.com/expr-lang/expr/checker/nature"
"github.com/expr-lang/expr/conf"
"github.com/expr-lang/expr/file"
"github.com/expr-lang/expr/parser"
. "github.com/expr-lang/expr/vm"
"github.com/expr-lang/expr/vm/runtime"
"github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/builtin"
"github.com/hanzoai/expr/checker"
. "github.com/hanzoai/expr/checker/nature"
"github.com/hanzoai/expr/conf"
"github.com/hanzoai/expr/file"
"github.com/hanzoai/expr/parser"
. "github.com/hanzoai/expr/vm"
"github.com/hanzoai/expr/vm/runtime"
)
const (
+7 -7
View File
@@ -4,14 +4,14 @@ import (
"math"
"testing"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/test/mock"
"github.com/expr-lang/expr/test/playground"
"github.com/expr-lang/expr/vm"
"github.com/expr-lang/expr/vm/runtime"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/test/mock"
"github.com/hanzoai/expr/test/playground"
"github.com/hanzoai/expr/vm"
"github.com/hanzoai/expr/vm/runtime"
)
type B struct {
+4 -4
View File
@@ -4,10 +4,10 @@ import (
"fmt"
"reflect"
"github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/builtin"
"github.com/expr-lang/expr/checker/nature"
"github.com/expr-lang/expr/vm/runtime"
"github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/builtin"
"github.com/hanzoai/expr/checker/nature"
"github.com/hanzoai/expr/vm/runtime"
)
var (
+3 -3
View File
@@ -4,9 +4,9 @@ import (
"fmt"
"reflect"
. "github.com/expr-lang/expr/checker/nature"
"github.com/expr-lang/expr/internal/deref"
"github.com/expr-lang/expr/types"
. "github.com/hanzoai/expr/checker/nature"
"github.com/hanzoai/expr/internal/deref"
"github.com/hanzoai/expr/types"
)
// Env returns the Nature of the given environment.
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
. "github.com/expr-lang/expr/vm"
. "github.com/hanzoai/expr/vm"
)
func StartDebugger(program *Program, env any) {
+3 -3
View File
@@ -1,9 +1,9 @@
module github.com/expr-lang/expr/debug
module github.com/hanzoai/expr/debug
go 1.18
require (
github.com/expr-lang/expr v0.0.0
github.com/hanzoai/expr v0.0.0
github.com/gdamore/tcell/v2 v2.6.0
github.com/rivo/tview v0.0.0-20230814110005-ccc2c8119703
)
@@ -18,4 +18,4 @@ require (
golang.org/x/text v0.12.0 // indirect
)
replace github.com/expr-lang/expr => ../
replace github.com/hanzoai/expr => ../
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"regexp"
"strings"
"github.com/expr-lang/expr/checker/nature"
"github.com/expr-lang/expr/conf"
"github.com/expr-lang/expr/internal/deref"
"github.com/hanzoai/expr/checker/nature"
"github.com/hanzoai/expr/conf"
"github.com/hanzoai/expr/internal/deref"
)
// Kind can be any of array, map, struct, func, string, int, float, bool or any.
+5 -5
View File
@@ -5,10 +5,10 @@ import (
"testing"
"time"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
. "github.com/expr-lang/expr/docgen"
. "github.com/hanzoai/expr/docgen"
)
type Tweet struct {
@@ -128,7 +128,7 @@ func TestCreateDoc(t *testing.T) {
},
},
},
PkgPath: "github.com/expr-lang/expr/docgen_test",
PkgPath: "github.com/hanzoai/expr/docgen_test",
}
assert.Equal(t, expected.Markdown(), doc.Markdown())
@@ -199,7 +199,7 @@ func TestCreateDoc_Ambiguous(t *testing.T) {
},
},
},
PkgPath: "github.com/expr-lang/expr/docgen_test",
PkgPath: "github.com/hanzoai/expr/docgen_test",
}
assert.Equal(t, expected.Markdown(), doc.Markdown())
+10 -10
View File
@@ -6,16 +6,16 @@ import (
"reflect"
"time"
"github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/builtin"
"github.com/expr-lang/expr/checker"
"github.com/expr-lang/expr/compiler"
"github.com/expr-lang/expr/conf"
"github.com/expr-lang/expr/file"
"github.com/expr-lang/expr/optimizer"
"github.com/expr-lang/expr/parser"
"github.com/expr-lang/expr/patcher"
"github.com/expr-lang/expr/vm"
"github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/builtin"
"github.com/hanzoai/expr/checker"
"github.com/hanzoai/expr/compiler"
"github.com/hanzoai/expr/conf"
"github.com/hanzoai/expr/file"
"github.com/hanzoai/expr/optimizer"
"github.com/hanzoai/expr/parser"
"github.com/hanzoai/expr/patcher"
"github.com/hanzoai/expr/vm"
)
// Option for configuring config.
+9 -9
View File
@@ -11,16 +11,16 @@ import (
"testing"
"time"
"github.com/expr-lang/expr/conf"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/expr-lang/expr/types"
"github.com/expr-lang/expr/vm"
"github.com/hanzoai/expr/conf"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/hanzoai/expr/types"
"github.com/hanzoai/expr/vm"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/file"
"github.com/expr-lang/expr/test/mock"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/file"
"github.com/hanzoai/expr/test/mock"
)
func ExampleEval() {
+1 -1
View File
@@ -1,3 +1,3 @@
module github.com/expr-lang/expr
module github.com/hanzoai/expr
go 1.18
+2 -2
View File
@@ -4,9 +4,9 @@ import (
"reflect"
"testing"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/deref"
"github.com/hanzoai/expr/internal/deref"
)
func TestDeref(t *testing.T) {
+1 -1
View File
@@ -21,7 +21,7 @@ import (
"reflect"
"testing"
"github.com/expr-lang/expr/internal/spew"
"github.com/hanzoai/expr/internal/spew"
)
// custom type to test Stinger interface on non-pointer receiver.
+1 -1
View File
@@ -67,7 +67,7 @@ import (
"testing"
"unsafe"
"github.com/expr-lang/expr/internal/spew"
"github.com/hanzoai/expr/internal/spew"
)
// dumpTest is used to describe a test to be performed against the Dump method.
+1 -1
View File
@@ -27,7 +27,7 @@ package spew_test
import (
"fmt"
"github.com/expr-lang/expr/internal/spew/testdata"
"github.com/hanzoai/expr/internal/spew/testdata"
)
func addCgoDumpTests() {
+1 -1
View File
@@ -19,7 +19,7 @@ package spew_test
import (
"fmt"
"github.com/expr-lang/expr/internal/spew"
"github.com/hanzoai/expr/internal/spew"
)
type Flag int
+1 -1
View File
@@ -72,7 +72,7 @@ import (
"testing"
"unsafe"
"github.com/expr-lang/expr/internal/spew"
"github.com/hanzoai/expr/internal/spew"
)
// formatterTest is used to describe a test to be performed against NewFormatter.
+1 -1
View File
@@ -23,7 +23,7 @@ import (
"os"
"testing"
"github.com/expr-lang/expr/internal/spew"
"github.com/hanzoai/expr/internal/spew"
)
// spewFunc is used to identify which public function of the spew package or
@@ -166,7 +166,7 @@ func TestGreater(t *testing.T) {
out := &outputT{buf: bytes.NewBuffer(nil)}
False(t, Greater(out, currCase.less, currCase.greater))
Contains(t, out.buf.String(), currCase.msg)
Contains(t, out.helpers, "github.com/expr-lang/expr/internal/testify/assert.Greater")
Contains(t, out.helpers, "github.com/hanzoai/expr/internal/testify/assert.Greater")
}
}
@@ -210,7 +210,7 @@ func TestGreaterOrEqual(t *testing.T) {
out := &outputT{buf: bytes.NewBuffer(nil)}
False(t, GreaterOrEqual(out, currCase.less, currCase.greater))
Contains(t, out.buf.String(), currCase.msg)
Contains(t, out.helpers, "github.com/expr-lang/expr/internal/testify/assert.GreaterOrEqual")
Contains(t, out.helpers, "github.com/hanzoai/expr/internal/testify/assert.GreaterOrEqual")
}
}
@@ -254,7 +254,7 @@ func TestLess(t *testing.T) {
out := &outputT{buf: bytes.NewBuffer(nil)}
False(t, Less(out, currCase.greater, currCase.less))
Contains(t, out.buf.String(), currCase.msg)
Contains(t, out.helpers, "github.com/expr-lang/expr/internal/testify/assert.Less")
Contains(t, out.helpers, "github.com/hanzoai/expr/internal/testify/assert.Less")
}
}
@@ -298,7 +298,7 @@ func TestLessOrEqual(t *testing.T) {
out := &outputT{buf: bytes.NewBuffer(nil)}
False(t, LessOrEqual(out, currCase.greater, currCase.less))
Contains(t, out.buf.String(), currCase.msg)
Contains(t, out.helpers, "github.com/expr-lang/expr/internal/testify/assert.LessOrEqual")
Contains(t, out.helpers, "github.com/hanzoai/expr/internal/testify/assert.LessOrEqual")
}
}
@@ -337,7 +337,7 @@ func TestPositive(t *testing.T) {
out := &outputT{buf: bytes.NewBuffer(nil)}
False(t, Positive(out, currCase.e))
Contains(t, out.buf.String(), currCase.msg)
Contains(t, out.helpers, "github.com/expr-lang/expr/internal/testify/assert.Positive")
Contains(t, out.helpers, "github.com/hanzoai/expr/internal/testify/assert.Positive")
}
}
@@ -376,7 +376,7 @@ func TestNegative(t *testing.T) {
out := &outputT{buf: bytes.NewBuffer(nil)}
False(t, Negative(out, currCase.e))
Contains(t, out.buf.String(), currCase.msg)
Contains(t, out.helpers, "github.com/expr-lang/expr/internal/testify/assert.Negative")
Contains(t, out.helpers, "github.com/hanzoai/expr/internal/testify/assert.Negative")
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated with github.com/expr-lang/expr/internal/_codegen; DO NOT EDIT.
// Code generated with github.com/hanzoai/expr/internal/_codegen; DO NOT EDIT.
package assert
+1 -1
View File
@@ -1,4 +1,4 @@
// Code generated with github.com/expr-lang/expr/internal/_codegen; DO NOT EDIT.
// Code generated with github.com/hanzoai/expr/internal/_codegen; DO NOT EDIT.
package assert
+2 -2
View File
@@ -17,9 +17,9 @@ import (
"unicode"
"unicode/utf8"
"github.com/expr-lang/expr/internal/spew"
"github.com/hanzoai/expr/internal/spew"
"github.com/expr-lang/expr/internal/difflib"
"github.com/hanzoai/expr/internal/difflib"
)
//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_format.go.tmpl"
+2 -2
View File
@@ -6,7 +6,7 @@
//
// import (
// "testing"
// "github.com/expr-lang/expr/internal/testify/assert"
// "github.com/hanzoai/expr/internal/testify/assert"
// )
//
// func TestSomething(t *testing.T) {
@@ -22,7 +22,7 @@
//
// import (
// "testing"
// "github.com/expr-lang/expr/internal/testify/assert"
// "github.com/hanzoai/expr/internal/testify/assert"
// )
//
// func TestSomething(t *testing.T) {
@@ -5,7 +5,7 @@ import (
"testing"
"unsafe"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/assert"
)
type ignoreTestingT struct{}
+1 -1
View File
@@ -7,7 +7,7 @@
//
// import (
// "testing"
// "github.com/expr-lang/expr/internal/testify/require"
// "github.com/hanzoai/expr/internal/testify/require"
// )
//
// func TestSomething(t *testing.T) {
+2 -2
View File
@@ -1,4 +1,4 @@
// Code generated with github.com/expr-lang/expr/internal/_codegen; DO NOT EDIT.
// Code generated with github.com/hanzoai/expr/internal/_codegen; DO NOT EDIT.
package require
@@ -7,7 +7,7 @@ import (
url "net/url"
time "time"
assert "github.com/expr-lang/expr/internal/testify/assert"
assert "github.com/hanzoai/expr/internal/testify/assert"
)
// Condition uses a Comparison to assert a complex condition.
+2 -2
View File
@@ -1,4 +1,4 @@
// Code generated with github.com/expr-lang/expr/internal/_codegen; DO NOT EDIT.
// Code generated with github.com/hanzoai/expr/internal/_codegen; DO NOT EDIT.
package require
@@ -7,7 +7,7 @@ import (
url "net/url"
time "time"
assert "github.com/expr-lang/expr/internal/testify/assert"
assert "github.com/hanzoai/expr/internal/testify/assert"
)
// Condition uses a Comparison to assert a complex condition.
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"reflect"
"strings"
. "github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/file"
. "github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/file"
)
var errorType = reflect.TypeOf((*error)(nil)).Elem()
+1 -1
View File
@@ -1,7 +1,7 @@
package optimizer
import (
. "github.com/expr-lang/expr/ast"
. "github.com/hanzoai/expr/ast"
)
type filterFirst struct{}
+1 -1
View File
@@ -1,7 +1,7 @@
package optimizer
import (
. "github.com/expr-lang/expr/ast"
. "github.com/hanzoai/expr/ast"
)
type filterLast struct{}
+1 -1
View File
@@ -1,7 +1,7 @@
package optimizer
import (
. "github.com/expr-lang/expr/ast"
. "github.com/hanzoai/expr/ast"
)
type filterLen struct{}
+1 -1
View File
@@ -1,7 +1,7 @@
package optimizer
import (
. "github.com/expr-lang/expr/ast"
. "github.com/hanzoai/expr/ast"
)
type filterMap struct{}
+5 -5
View File
@@ -3,11 +3,11 @@ package optimizer_test
import (
"testing"
. "github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/expr-lang/expr/optimizer"
"github.com/expr-lang/expr/parser"
. "github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/hanzoai/expr/optimizer"
"github.com/hanzoai/expr/parser"
)
func TestOptimize_filter_map(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package optimizer
import (
"math"
. "github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/file"
. "github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/file"
)
type fold struct {
+5 -5
View File
@@ -4,11 +4,11 @@ import (
"reflect"
"testing"
"github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/expr-lang/expr/optimizer"
"github.com/expr-lang/expr/parser"
"github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/hanzoai/expr/optimizer"
"github.com/hanzoai/expr/parser"
)
func TestOptimize_constant_folding(t *testing.T) {
+1 -1
View File
@@ -3,7 +3,7 @@ package optimizer
import (
"reflect"
. "github.com/expr-lang/expr/ast"
. "github.com/hanzoai/expr/ast"
)
type inArray struct{}
+1 -1
View File
@@ -3,7 +3,7 @@ package optimizer
import (
"reflect"
. "github.com/expr-lang/expr/ast"
. "github.com/hanzoai/expr/ast"
)
type inRange struct{}
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"fmt"
"reflect"
. "github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/conf"
. "github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/conf"
)
func Optimize(node *Node, config *conf.Config) error {
+8 -8
View File
@@ -5,15 +5,15 @@ import (
"strings"
"testing"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/checker"
"github.com/expr-lang/expr/conf"
"github.com/expr-lang/expr/optimizer"
"github.com/expr-lang/expr/parser"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/checker"
"github.com/hanzoai/expr/conf"
"github.com/hanzoai/expr/optimizer"
"github.com/hanzoai/expr/parser"
)
func TestOptimize(t *testing.T) {
+2 -2
View File
@@ -1,8 +1,8 @@
package optimizer
import (
. "github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/parser/operator"
. "github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/parser/operator"
)
/*
+1 -1
View File
@@ -3,7 +3,7 @@ package optimizer
import (
"fmt"
. "github.com/expr-lang/expr/ast"
. "github.com/hanzoai/expr/ast"
)
type sumArray struct{}
+7 -7
View File
@@ -3,14 +3,14 @@ package optimizer_test
import (
"testing"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/optimizer"
"github.com/expr-lang/expr/parser"
"github.com/expr-lang/expr/vm"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/optimizer"
"github.com/hanzoai/expr/parser"
"github.com/hanzoai/expr/vm"
)
func BenchmarkSumArray(b *testing.B) {
+1 -1
View File
@@ -1,7 +1,7 @@
package optimizer
import (
. "github.com/expr-lang/expr/ast"
. "github.com/hanzoai/expr/ast"
)
type sumMap struct{}
+5 -5
View File
@@ -3,12 +3,12 @@ package optimizer_test
import (
"testing"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/optimizer"
"github.com/expr-lang/expr/parser"
"github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/optimizer"
"github.com/hanzoai/expr/parser"
)
func TestOptimize_sum_map(t *testing.T) {
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"strings"
"unicode/utf8"
"github.com/expr-lang/expr/file"
"github.com/expr-lang/expr/internal/ring"
"github.com/hanzoai/expr/file"
"github.com/hanzoai/expr/internal/ring"
)
const ringChunkSize = 10
+4 -4
View File
@@ -5,10 +5,10 @@ import (
"strings"
"testing"
"github.com/expr-lang/expr/file"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
. "github.com/expr-lang/expr/parser/lexer"
"github.com/hanzoai/expr/file"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
. "github.com/hanzoai/expr/parser/lexer"
)
func TestLex(t *testing.T) {
+1 -1
View File
@@ -3,7 +3,7 @@ package lexer
import (
"strings"
"github.com/expr-lang/expr/parser/utils"
"github.com/hanzoai/expr/parser/utils"
)
type stateFn func(*Lexer) stateFn
+1 -1
View File
@@ -3,7 +3,7 @@ package lexer
import (
"fmt"
"github.com/expr-lang/expr/file"
"github.com/hanzoai/expr/file"
)
type Kind string
+7 -7
View File
@@ -8,13 +8,13 @@ import (
"strconv"
"strings"
. "github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/builtin"
"github.com/expr-lang/expr/conf"
"github.com/expr-lang/expr/file"
. "github.com/expr-lang/expr/parser/lexer"
"github.com/expr-lang/expr/parser/operator"
"github.com/expr-lang/expr/parser/utils"
. "github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/builtin"
"github.com/hanzoai/expr/conf"
"github.com/hanzoai/expr/file"
. "github.com/hanzoai/expr/parser/lexer"
"github.com/hanzoai/expr/parser/operator"
"github.com/hanzoai/expr/parser/utils"
)
type arg byte
+5 -5
View File
@@ -5,12 +5,12 @@ import (
"strings"
"testing"
"github.com/expr-lang/expr/conf"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/conf"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
. "github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/parser"
. "github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/parser"
)
func TestParse(t *testing.T) {
+4 -4
View File
@@ -4,10 +4,10 @@ import (
"fmt"
"reflect"
"github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/builtin"
"github.com/expr-lang/expr/checker/nature"
"github.com/expr-lang/expr/conf"
"github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/builtin"
"github.com/hanzoai/expr/checker/nature"
"github.com/hanzoai/expr/conf"
)
type OperatorOverloading struct {
+3 -3
View File
@@ -3,10 +3,10 @@ package value
import (
"testing"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/vm"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/vm"
)
func Benchmark_valueAdd(b *testing.B) {
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"reflect"
"time"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/ast"
"github.com/expr-lang/expr/conf"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/ast"
"github.com/hanzoai/expr/conf"
)
// ValueGetter is a Patcher that allows custom types to be represented as standard go values for use with expr.
+3 -3
View File
@@ -3,9 +3,9 @@ package value_test
import (
"fmt"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/patcher/value"
"github.com/expr-lang/expr/vm"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/patcher/value"
"github.com/hanzoai/expr/vm"
)
type myInt struct {
+3 -3
View File
@@ -3,10 +3,10 @@ package value
import (
"testing"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/vm"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/vm"
)
type customInt struct {
+1 -1
View File
@@ -3,7 +3,7 @@ package patcher
import (
"reflect"
"github.com/expr-lang/expr/ast"
"github.com/hanzoai/expr/ast"
)
// WithContext adds WithContext.Name argument to all functions calls with a context.Context argument.
+3 -3
View File
@@ -4,10 +4,10 @@ import (
"context"
"testing"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/patcher"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/patcher"
)
func TestWithContext(t *testing.T) {
+1 -1
View File
@@ -3,7 +3,7 @@ package patcher
import (
"time"
"github.com/expr-lang/expr/ast"
"github.com/hanzoai/expr/ast"
)
// WithTimezone passes Location to date() and now() functions.
+2 -2
View File
@@ -4,9 +4,9 @@ import (
"testing"
"time"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr"
"github.com/hanzoai/expr"
)
func TestWithTimezone_date(t *testing.T) {
+5 -5
View File
@@ -1,11 +1,11 @@
module github.com/expr-lang/expr/repl
module github.com/hanzoai/expr/repl
go 1.20
require (
github.com/bettercap/readline v0.0.0-20210228151553-655e48bcb7bf
github.com/expr-lang/expr v1.13.0
github.com/expr-lang/expr/debug v0.0.0
github.com/hanzoai/expr v1.13.0
github.com/hanzoai/expr/debug v0.0.0
)
require (
@@ -21,6 +21,6 @@ require (
golang.org/x/text v0.12.0 // indirect
)
replace github.com/expr-lang/expr => ../
replace github.com/hanzoai/expr => ../
replace github.com/expr-lang/expr/debug => ../debug
replace github.com/hanzoai/expr/debug => ../debug
+5 -5
View File
@@ -6,14 +6,14 @@ import (
"runtime"
"strings"
"github.com/expr-lang/expr/test/fuzz"
"github.com/hanzoai/expr/test/fuzz"
"github.com/bettercap/readline"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/builtin"
"github.com/expr-lang/expr/debug"
"github.com/expr-lang/expr/vm"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/builtin"
"github.com/hanzoai/expr/debug"
"github.com/hanzoai/expr/vm"
)
var keywords = []string{
+3 -3
View File
@@ -3,9 +3,9 @@ package bench_test
import (
"testing"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/expr-lang/expr/vm"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/hanzoai/expr/vm"
)
type Env struct {
+3 -3
View File
@@ -4,10 +4,10 @@ import (
"context"
"testing"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/test/coredns"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/test/coredns"
)
func TestCoreDNS(t *testing.T) {
+3 -3
View File
@@ -5,10 +5,10 @@ import (
"os"
"testing"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/test/crowdsec"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/test/crowdsec"
)
func TestCrowdsec(t *testing.T) {
+3 -3
View File
@@ -5,10 +5,10 @@ import (
"testing"
"time"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr"
"github.com/hanzoai/expr"
)
func TestDeref_binary(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"os"
"testing"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/internal/testify/require"
)
var examples []CodeBlock
+1 -1
View File
@@ -3,7 +3,7 @@ package fuzz
import (
"fmt"
"github.com/expr-lang/expr"
"github.com/hanzoai/expr"
)
func NewEnv() map[string]any {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"strings"
"testing"
"github.com/expr-lang/expr"
"github.com/hanzoai/expr"
)
//go:embed fuzz_corpus.txt
+2 -2
View File
@@ -8,8 +8,8 @@ import (
"strings"
"sync"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/builtin"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/builtin"
)
var (
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"strings"
"testing"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/internal/testify/require"
)
var updateFlag = flag.Bool("update", false, "Drop failing lines from examples.txt")
+3 -3
View File
@@ -3,10 +3,10 @@ package interface_test
import (
"testing"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr/internal/testify/assert"
"github.com/hanzoai/expr/internal/testify/require"
"github.com/expr-lang/expr"
"github.com/hanzoai/expr"
)
type Bar interface {
+2 -2
View File
@@ -3,8 +3,8 @@ package interface_test
import (
"testing"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/internal/testify/assert"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/internal/testify/assert"
)
type StoreInterface interface {
+2 -2
View File
@@ -3,8 +3,8 @@ package issue_test
import (
"testing"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/internal/testify/require"
)
func TestIssue461(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package issue_test
import (
"testing"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/internal/testify/require"
)
type Foo interface {
+2 -2
View File
@@ -3,8 +3,8 @@ package issue_test
import (
"testing"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/internal/testify/require"
)
func TestIssue723(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package issue_test
import (
"testing"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/internal/testify/require"
)
type ModeEnum int
+2 -2
View File
@@ -3,8 +3,8 @@ package issue_test
import (
"testing"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/internal/testify/require"
)
func TestIssue739(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"context"
"testing"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/internal/testify/require"
)
type X struct{}
+2 -2
View File
@@ -3,8 +3,8 @@ package issue_test
import (
"testing"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/internal/testify/require"
)
func TestIssue785(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package issue_test
import (
"testing"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/internal/testify/require"
"github.com/hanzoai/expr"
"github.com/hanzoai/expr/internal/testify/require"
)
func TestEnvFieldMethods(t *testing.T) {

Some files were not shown because too many files have changed in this diff Show More