the Nim compiler supports the jsondoc2 command

This commit is contained in:
Andreas Rumpf 2016-07-12 22:35:55 +02:00
commit 813828f690
4 changed files with 64 additions and 25 deletions

View file

@ -46,10 +46,11 @@ proc commandCheck =
rodPass()
compileProject()
proc commandDoc2 =
proc commandDoc2(json: bool) =
msgs.gErrorMax = high(int) # do not stop after first error
semanticPasses()
registerPass(docgen2Pass)
if json: registerPass(docgen2JsonPass)
else: registerPass(docgen2Pass)
#registerPass(cleanupPass())
compileProject()
finishDoc2Pass(gProjectName)
@ -281,7 +282,7 @@ proc mainCommand* =
gCmd = cmdDoc
loadConfigs(DocConfig)
defineSymbol("nimdoc")
commandDoc2()
commandDoc2(false)
of "rst2html":
gCmd = cmdRst2html
loadConfigs(DocConfig)
@ -296,7 +297,13 @@ proc mainCommand* =
loadConfigs(DocConfig)
wantMainModule()
defineSymbol("nimdoc")
commandJSON()
commandJson()
of "jsondoc2":
gCmd = cmdDoc
loadConfigs(DocConfig)
wantMainModule()
defineSymbol("nimdoc")
commandDoc2(true)
of "buildindex":
gCmd = cmdDoc
loadConfigs(DocConfig)