moved scanner sources to package 'scan'
This commit is contained in:
+4
-3
@@ -9,6 +9,7 @@ import (
|
||||
"os"
|
||||
|
||||
"git.portale-stac.it/go-pkg/expr/kern"
|
||||
"git.portale-stac.it/go-pkg/expr/scan"
|
||||
)
|
||||
|
||||
func importFunc(ctx kern.ExprContext, name string, args map[string]any) (result any, err error) {
|
||||
@@ -43,10 +44,10 @@ func doImport(ctx kern.ExprContext, name string, dirList []string, it kern.Itera
|
||||
var file *os.File
|
||||
if file, err = os.Open(sourceFilepath); err == nil {
|
||||
defer file.Close()
|
||||
var expr *ast
|
||||
scanner := NewScanner(file, DefaultTranslations())
|
||||
var expr *scan.Ast
|
||||
scanner := scan.NewScanner(file, scan.DefaultTranslations())
|
||||
parser := NewParser()
|
||||
if expr, err = parser.parseGeneral(scanner, allowMultiExpr|allowVarRef, SymEos); err == nil {
|
||||
if expr, err = parser.parseGeneral(scanner, allowMultiExpr|allowVarRef, scan.SymEos); err == nil {
|
||||
result, err = expr.Eval(ctx)
|
||||
}
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user