make system.task compatible with NimScript; refs #10254
This commit is contained in:
parent
2823da5e52
commit
5cd18b0f24
1 changed files with 3 additions and 2 deletions
|
|
@ -341,14 +341,15 @@ when not defined(nimble):
|
||||||
## .. code-block:: nim
|
## .. code-block:: nim
|
||||||
## task build, "default build is via the C backend":
|
## task build, "default build is via the C backend":
|
||||||
## setCommand "c"
|
## setCommand "c"
|
||||||
proc `name Task`*() = body
|
proc `name Task`*() =
|
||||||
|
setCommand "nop"
|
||||||
|
body
|
||||||
|
|
||||||
let cmd = getCommand()
|
let cmd = getCommand()
|
||||||
if cmd.len == 0 or cmd ==? "help":
|
if cmd.len == 0 or cmd ==? "help":
|
||||||
setCommand "help"
|
setCommand "help"
|
||||||
writeTask(astToStr(name), description)
|
writeTask(astToStr(name), description)
|
||||||
elif cmd ==? astToStr(name):
|
elif cmd ==? astToStr(name):
|
||||||
setCommand "nop"
|
|
||||||
`name Task`()
|
`name Task`()
|
||||||
|
|
||||||
# nimble has its own implementation for these things.
|
# nimble has its own implementation for these things.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue