diff options
author | Araq <rumpf_a@web.de> | 2016-07-14 01:11:47 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2016-07-14 01:11:47 +0200 |
commit | 928ac1e9945582bf443ecc8a54aa5be76f17ecbd (patch) | |
tree | 264003f79787a89ab55e97dd6366dc3e83ab2c9e /compiler/main.nim | |
parent | c48102254a47bfbdbd4deb0d31c4d8cd91ce938b (diff) | |
parent | 491e8d04ec3d1631f5bde71148649b05c27d8b7d (diff) | |
download | Nim-928ac1e9945582bf443ecc8a54aa5be76f17ecbd.tar.gz |
Merge branch 'devel' of github.com:nim-lang/Nim into devel
Diffstat (limited to 'compiler/main.nim')
-rw-r--r-- | compiler/main.nim | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/compiler/main.nim b/compiler/main.nim index b1b9006bd..0db66b53e 100644 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -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) |