refactored data-types to reduce plugin sizes
This commit is contained in:
@@ -7,10 +7,21 @@ package expr
|
||||
import (
|
||||
"git.portale-stac.it/go-pkg/expr/kern"
|
||||
"git.portale-stac.it/go-pkg/expr/scan"
|
||||
"git.portale-stac.it/go-pkg/expr/types/fract"
|
||||
)
|
||||
|
||||
// -------- literal term
|
||||
func newLiteralTerm(tk *scan.Token) *scan.Term {
|
||||
|
||||
if tk.Sym == scan.SymFraction {
|
||||
if v, isString := tk.Value.(string); isString {
|
||||
var err error
|
||||
if tk.Value, err = fract.MakeGeneratingFraction(v); err != nil {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return &scan.Term{
|
||||
Tk: *tk,
|
||||
Parent: nil,
|
||||
|
||||
Reference in New Issue
Block a user