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 25, 2023
1 parent 28e35f0 commit 83ad401
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions makesure.awk
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ function registerGoal(goalName, priv, i) {
arrPush(GoalNames, goalName)
GoalsByName[goalName] = priv
if ("@params" == $3)
for (i=4; i <= NF; i++)
GoalParams[goalName,GoalParamsCnt[goalName]++] = $i # TODO $NF=="@private"?
for (i=4; i <= NF-priv; i++) # a bit "hacky", but this means that when "@private" == $NF, need to iter till i <= (NF-1)
GoalParams[goalName,GoalParamsCnt[goalName]++] = $i
# TODO error if @params on other position
}

Expand All @@ -251,7 +251,7 @@ function calcGlob(goalName, pattern, script, file) {
quicksort(GlobFiles,0,arrLen(GlobFiles)-1)
}

function isPriv() { if ("@private" != $NF) return 0; NF--; return 1 }
function isPriv() { return "@private" == $NF }

function handleGoalGlob( goalName,globAllGoal,globSingle,priv,i,pattern) {
started("goal_glob")
Expand Down

0 comments on commit 83ad401

Please sign in to comment.