Expr's functions now support parameters with default value

This commit is contained in:
2024-06-01 19:56:40 +02:00
parent f66cd1fdb1
commit 9bba40f155
12 changed files with 180 additions and 247 deletions
+9
View File
@@ -229,3 +229,12 @@ func (self *term) evalPrefix(ctx ExprContext) (childValue any, err error) {
}
return
}
// NOTE Temporary solution to support function parameters with default value
func (self *term) forceChild(c *term) {
if self.children == nil {
self.children = make([]*term, 0, 1)
}
self.children = append(self.children, c)
}