Skip to content

Commit

Permalink
Parameterized goals #115
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Jan 21, 2023
1 parent 7dbae83 commit 346eff6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions makesure.awk
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ function prepareArgs( i,arg) {
Options["timing"]
}

#function dbgA(name, arr, i) { print "--- " name ": "; for (i in arr) printf "%2s : %s\n", i, arr[i] }
#function dbgAO(name, arr, i) { print "--- " name ": "; for (i=0;i in arr;i++) printf "%2s : %s\n", i, arr[i] }
function dbgA(name, arr, i) { print "--- " name ": "; for (i in arr) printf "%2s : %s\n", i, arr[i] }
function dbgAO(name, arr, i) { print "--- " name ": "; for (i=0;i in arr;i++) printf "%2s : %s\n", i, arr[i] }
#function indent(ind) {
# printf "%" ind*2 "s", ""
#}
Expand Down Expand Up @@ -413,7 +413,7 @@ body,goalBody,goalBodies,resolvedGoals,exitCode, t0,t1,t2, goalTimed, list) {

topologicalSort(0,GoalNames) # first do topological sort disregarding @reached_if to catch loops

# instantiateGoals()
instantiateGoals()

# printDepsTree("a")

Expand Down Expand Up @@ -633,7 +633,10 @@ function instantiate(goal,args,newArgs, i,j,depArg,depArgType,dep,goalNameInst
arrPush(GoalNames, goalNameInstantiated)
copyKey(goal,goalNameInstantiated,GoalsByName)
copyKey(goal,goalNameInstantiated,DependenciesCnt)
copyKey(goal,goalNameInstantiated,CodePre) # TODO attach dependency var values
copyKey(goal,goalNameInstantiated,CodePre)
for (i in args) {
CodePre[goalNameInstantiated] = addL(CodePre[goalNameInstantiated], i "=" args[i])
}
copyKey(goal,goalNameInstantiated,Code)
copyKey(goal,goalNameInstantiated,Doc)
copyKey(goal,goalNameInstantiated,ReachedIf)
Expand Down

0 comments on commit 346eff6

Please sign in to comment.