moved scanner sources to package 'scan'
This commit is contained in:
+3
-2
@@ -10,6 +10,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"git.portale-stac.it/go-pkg/expr/kern"
|
||||
"git.portale-stac.it/go-pkg/expr/scan"
|
||||
)
|
||||
|
||||
type inputType struct {
|
||||
@@ -70,7 +71,7 @@ func getWantedError(input *inputType) error {
|
||||
}
|
||||
|
||||
func doTest(t *testing.T, ctx kern.ExprContext, section string, input *inputType, count int) (good bool) {
|
||||
var ast Expr
|
||||
var ast kern.Expr
|
||||
var gotResult any
|
||||
var gotErr error
|
||||
|
||||
@@ -84,7 +85,7 @@ func doTest(t *testing.T, ctx kern.ExprContext, section string, input *inputType
|
||||
logTest(t, count, section, input.source, input.wantResult, wantErr)
|
||||
|
||||
r := strings.NewReader(input.source)
|
||||
scanner := NewScanner(r, DefaultTranslations())
|
||||
scanner := scan.NewScanner(r, scan.DefaultTranslations())
|
||||
|
||||
good = true
|
||||
if ast, gotErr = parser.Parse(scanner); gotErr == nil {
|
||||
|
||||
Reference in New Issue
Block a user