moved a subset of source file to the kern package
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// Copyright (c) 2024 Celestino Amoroso (celestino.amoroso@gmail.com).
|
||||
// All rights reserved.
|
||||
|
||||
// expr-context.go
|
||||
package kern
|
||||
|
||||
// ----Expression Context
|
||||
type ExprContext interface {
|
||||
Clone() ExprContext
|
||||
SetParent(ctx ExprContext)
|
||||
GetParent() (ctx ExprContext)
|
||||
GetGlobal() (ctx ExprContext)
|
||||
GetVar(varName string) (value any, exists bool)
|
||||
GetLast() any
|
||||
SetVar(varName string, value any)
|
||||
UnsafeSetVar(varName string, value any)
|
||||
|
||||
EnumVars(func(name string) (accept bool)) (varNames []string)
|
||||
VarCount() int
|
||||
DeleteVar(varName string)
|
||||
|
||||
EnumFuncs(func(name string) (accept bool)) (funcNames []string)
|
||||
FuncCount() int
|
||||
DeleteFunc(funcName string)
|
||||
|
||||
GetLocalFuncInfo(name string) (info ExprFunc, exists bool)
|
||||
GetFuncInfo(name string) (item ExprFunc, exists bool)
|
||||
Call(name string, args map[string]any) (result any, err error)
|
||||
RegisterFuncInfo(info ExprFunc)
|
||||
RegisterFunc(name string, f Functor, returnType string, param []ExprFuncParam) (funcInfo ExprFunc, err error)
|
||||
}
|
||||
Reference in New Issue
Block a user