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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user