tasks.nv
· 2.1 KiB · Text
原始檔案
Playground
||:: task foo
:: do something
:: do another thing
:: do yet another thing
:: end task
:: task bar
:: do another thing
:: do something
:: do yet another thing
:: end task
:: run task foo
:: run task bar
|:: do something | :did something:
|:: do another thing | :did another thing:
|:: do yet another thing| :did yet another thing:
|:: task $x :: end task |
|:: task $x? :: $1 | :tasks: $x $1
|:: task $x? :: $1 $2 | :tasks: $x $1 $2
|:: task $x? :: $1 $2 $3 | :tasks: $x $1 $2 $3
|:: task $x? :: $1 $2 $3 $4| :tasks: $x $1 $2 $3 $4
|:: run task $x|
:: load task $x
:: execute task
:: unload task $x
|:: load task $x? :tasks: $x $1 | :task: $1
|:: load task $x? :tasks: $x $1 $2 | :task: $1 $2
|:: load task $x? :tasks: $x $1 $2 $3 | :task: $1 $2 $3
|:: load task $x? :tasks: $x $1 $2 $3 $4| :task: $1 $2 $3 $4
|:: load task $x? :tasks: $y $1 | :checked tasks: $y $1
|:: load task $x? :tasks: $y $1 $2 | :checked tasks: $y $1 $2
|:: load task $x? :tasks: $y $1 $2 $3 | :checked tasks: $y $1 $2 $3
|:: load task $x? :tasks: $y $1 $2 $3 $4| :checked tasks: $y $1 $2 $3 $4
|:: load task $x| :: reset tasks
|:: execute task? :task: $1 | :: $1 :executed task items: $1
|:: execute task? :task: $1 $2 | :: $1 $2 :executed task items: $1 $2
|:: execute task? :task: $1 $2 $3 | :: $1 $2 $3 :executed task items: $1 $2 $3
|:: execute task? :task: $1 $2 $3 $4| :: $1 $2 $3 $4 :executed task items: $1 $2 $3 $4
|:: execute task|
|:: unload task $x? :executed task items: $1 | :tasks: $x $1
|:: unload task $x? :executed task items: $1 $2 | :tasks: $x $1 $2
|:: unload task $x? :executed task items: $1 $2 $3 | :tasks: $x $1 $2 $3
|:: unload task $x? :executed task items: $1 $2 $3 $4| :tasks: $x $1 $2 $3 $4
|:: unload task $x|
|:: reset tasks? :checked tasks: $x $1 | :tasks: $x $1
|:: reset tasks? :checked tasks: $x $1 $2 | :tasks: $x $1 $2
|:: reset tasks? :checked tasks: $x $1 $2 $3 | :tasks: $x $1 $2 $3
|:: reset tasks? :checked tasks: $x $1 $2 $3 $4| :tasks: $x $1 $2 $3 $4
|:: reset tasks|
| 1 | ||:: task foo |
| 2 | :: do something |
| 3 | :: do another thing |
| 4 | :: do yet another thing |
| 5 | :: end task |
| 6 | :: task bar |
| 7 | :: do another thing |
| 8 | :: do something |
| 9 | :: do yet another thing |
| 10 | :: end task |
| 11 | :: run task foo |
| 12 | :: run task bar |
| 13 | |
| 14 | |:: do something | :did something: |
| 15 | |:: do another thing | :did another thing: |
| 16 | |:: do yet another thing| :did yet another thing: |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |:: task $x :: end task | |
| 22 | |:: task $x? :: $1 | :tasks: $x $1 |
| 23 | |:: task $x? :: $1 $2 | :tasks: $x $1 $2 |
| 24 | |:: task $x? :: $1 $2 $3 | :tasks: $x $1 $2 $3 |
| 25 | |:: task $x? :: $1 $2 $3 $4| :tasks: $x $1 $2 $3 $4 |
| 26 | |
| 27 | |:: run task $x| |
| 28 | :: load task $x |
| 29 | :: execute task |
| 30 | :: unload task $x |
| 31 | |
| 32 | |:: load task $x? :tasks: $x $1 | :task: $1 |
| 33 | |:: load task $x? :tasks: $x $1 $2 | :task: $1 $2 |
| 34 | |:: load task $x? :tasks: $x $1 $2 $3 | :task: $1 $2 $3 |
| 35 | |:: load task $x? :tasks: $x $1 $2 $3 $4| :task: $1 $2 $3 $4 |
| 36 | |:: load task $x? :tasks: $y $1 | :checked tasks: $y $1 |
| 37 | |:: load task $x? :tasks: $y $1 $2 | :checked tasks: $y $1 $2 |
| 38 | |:: load task $x? :tasks: $y $1 $2 $3 | :checked tasks: $y $1 $2 $3 |
| 39 | |:: load task $x? :tasks: $y $1 $2 $3 $4| :checked tasks: $y $1 $2 $3 $4 |
| 40 | |:: load task $x| :: reset tasks |
| 41 | |
| 42 | |:: execute task? :task: $1 | :: $1 :executed task items: $1 |
| 43 | |:: execute task? :task: $1 $2 | :: $1 $2 :executed task items: $1 $2 |
| 44 | |:: execute task? :task: $1 $2 $3 | :: $1 $2 $3 :executed task items: $1 $2 $3 |
| 45 | |:: execute task? :task: $1 $2 $3 $4| :: $1 $2 $3 $4 :executed task items: $1 $2 $3 $4 |
| 46 | |:: execute task| |
| 47 | |
| 48 | |:: unload task $x? :executed task items: $1 | :tasks: $x $1 |
| 49 | |:: unload task $x? :executed task items: $1 $2 | :tasks: $x $1 $2 |
| 50 | |:: unload task $x? :executed task items: $1 $2 $3 | :tasks: $x $1 $2 $3 |
| 51 | |:: unload task $x? :executed task items: $1 $2 $3 $4| :tasks: $x $1 $2 $3 $4 |
| 52 | |:: unload task $x| |
| 53 | |
| 54 | |:: reset tasks? :checked tasks: $x $1 | :tasks: $x $1 |
| 55 | |:: reset tasks? :checked tasks: $x $1 $2 | :tasks: $x $1 $2 |
| 56 | |:: reset tasks? :checked tasks: $x $1 $2 $3 | :tasks: $x $1 $2 $3 |
| 57 | |:: reset tasks? :checked tasks: $x $1 $2 $3 $4| :tasks: $x $1 $2 $3 $4 |
| 58 | |:: reset tasks| |