IsOptional() function of ExprFuncParam renamed as IdDefault(). A new IsOptional() function created to check if a param is optional without requiring a default value

This commit is contained in:
2024-06-07 09:45:02 +02:00
parent 227944b3fb
commit 115ce26ce9
12 changed files with 44 additions and 25 deletions
+9
View File
@@ -11,6 +11,7 @@ import (
)
type SimpleStore struct {
parent ExprContext
varStore map[string]any
funcStore map[string]ExprFunc
}
@@ -26,6 +27,14 @@ func NewSimpleStore() *SimpleStore {
func filterRefName(name string) bool { return name[0] != '@' }
func filterPrivName(name string) bool { return name[0] != '_' }
func (ctx *SimpleStore) SetParent(parentCtx ExprContext) {
ctx.parent = parentCtx
}
func (ctx *SimpleStore) GetParent() ExprContext {
return ctx.parent
}
func (ctx *SimpleStore) Clone() ExprContext {
return &SimpleStore{
varStore: CloneFilteredMap(ctx.varStore, filterRefName),