several changes:
1. moved scan/symbol.go to new package sym and adapted all files that reference Symbol type and its values. 2. new type interval defined by begin, end and step values. 3. replaced operator-range.go with operator-interval.go. 4. replaced range operator begin:end with begin..end..step. 5. new implementation of sub-collection extraction based on new interval literal.
This commit is contained in:
+4
-3
@@ -9,19 +9,20 @@ import (
|
||||
"testing"
|
||||
|
||||
"git.portale-stac.it/go-pkg/expr/scan"
|
||||
"git.portale-stac.it/go-pkg/expr/sym"
|
||||
)
|
||||
|
||||
func TestDevString(t *testing.T) {
|
||||
type inputType struct {
|
||||
source string
|
||||
sym scan.Symbol
|
||||
sym sym.Symbol
|
||||
value any
|
||||
wantResult string
|
||||
}
|
||||
|
||||
inputs := []inputType{
|
||||
/* 1 */ {"100", scan.SymInteger, 100, fmt.Sprintf(`[%d]"100"{100}`, scan.SymInteger)},
|
||||
/* 2 */ {"+", scan.SymPlus, nil, fmt.Sprintf(`[%d]"+"{}`, scan.SymPlus)},
|
||||
/* 1 */ {"100", sym.SymInteger, 100, fmt.Sprintf(`[%d]"100"{100}`, sym.SymInteger)},
|
||||
/* 2 */ {"+", sym.SymPlus, nil, fmt.Sprintf(`[%d]"+"{}`, sym.SymPlus)},
|
||||
}
|
||||
|
||||
for i, input := range inputs {
|
||||
|
||||
Reference in New Issue
Block a user