commented tracing code

This commit is contained in:
Celestino Amoroso 2024-05-01 05:57:08 +02:00
parent 7aabd068ed
commit cdbe3dfc22
3 changed files with 5 additions and 1 deletions

View File

@ -27,8 +27,10 @@ func exportFunc(ctx ExprContext, name string, info ExprFunc) {
func exportObjects(destCtx, sourceCtx ExprContext) {
exportAll := isEnabled(sourceCtx, control_export_all)
// fmt.Printf("Exporting from sourceCtx [%p] to destCtx [%p] -- exportAll=%t\n", sourceCtx, destCtx, exportAll)
// Export variables
for _, refName := range sourceCtx.EnumVars(func(name string) bool { return exportAll || name[0] == '@' }) {
// fmt.Printf("\tExporting %q\n", refName)
refValue, _ := sourceCtx.GetVar(refName)
exportVar(destCtx, refName, refValue)
}

View File

@ -24,6 +24,7 @@ func newFuncCallTerm(tk *Token, args []*term) *term {
func evalFuncCall(parentCtx ExprContext, self *term) (v any, err error) {
ctx := cloneContext(parentCtx)
name, _ := self.tk.Value.(string)
// fmt.Printf("Call %s(), context: %p\n", name, ctx)
params := make([]any, len(self.children))
for i, tree := range self.children {
var param any

View File

@ -131,7 +131,8 @@ func evalIterator(ctx ExprContext, self *term) (v any, err error) {
}
dc := newDataCursor(ctx, ds)
// var it Iterator = dc
// fmt.Println(it)
if initFunc, exists := ds[initName]; exists && initFunc != nil {
var args []any
if len(self.children) > 1 {