refactored data-types to reduce plugin sizes

This commit is contained in:
2026-06-08 07:02:56 +02:00
parent fec7cc546c
commit b6da9bcad4
90 changed files with 1039 additions and 803 deletions
+4 -3
View File
@@ -7,7 +7,8 @@ package expr
import (
"testing"
"git.portale-stac.it/go-pkg/expr/kern"
"git.portale-stac.it/go-pkg/expr/types/dict"
"git.portale-stac.it/go-pkg/expr/types/fract"
)
func TestGeneralParser(t *testing.T) {
@@ -132,9 +133,9 @@ func TestGeneralParser(t *testing.T) {
/* 116 */ {`null`, nil, `undefined variable or function "null"`},
/* 117 */ {`{"key"}`, nil, "[1:8] expected `:`, got `}`"},
/* 118 */ {`{"key":}`, nil, "[1:9] expected `dictionary-value`, got `}`"},
/* 119 */ {`{}`, &kern.DictType{}, nil},
/* 119 */ {`{}`, &dict.DictType{}, nil},
/* 120 */ {`v=10; v++; v`, int64(11), nil},
/* 121 */ {`1.2()`, kern.NewFraction(6, 5), nil},
/* 121 */ {`1.2()`, fract.NewFraction(6, 5), nil},
/* 122 */ {`x="abc"; x ?! #x`, int64(3), nil},
/* 123 */ {`x ?! #x`, nil, `[1:7] prefix/postfix operator "#" does not support operand '<nil>' [nil]`},
/* 124 */ {`x ?! (x+1)`, nil, nil},