diff options
Diffstat (limited to 'compiler/main.nim')
-rw-r--r-- | compiler/main.nim | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/compiler/main.nim b/compiler/main.nim index 994c28ccb..db03f0e4d 100644 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -82,6 +82,10 @@ proc commandCompileToC(graph: ModuleGraph; cache: IdentCache) = extccomp.writeJsonBuildInstructions(proj) writeDepsFile(graph, toGeneratedFile(proj, "")) +proc commandJsonScript(graph: ModuleGraph; cache: IdentCache) = + let proj = changeFileExt(gProjectFull, "") + extccomp.runJsonBuildInstructions(proj) + proc commandCompileToJS(graph: ModuleGraph; cache: IdentCache) = #incl(gGlobalOptions, optSafeCode) setTarget(osJS, cpuJS) @@ -186,12 +190,12 @@ proc mainCommand*(graph: ModuleGraph; cache: IdentCache) = of "php": gCmd = cmdCompileToPHP commandCompileToJS(graph, cache) - of "doc": + of "doc0": wantMainModule() gCmd = cmdDoc loadConfigs(DocConfig, cache) commandDoc() - of "doc2": + of "doc2", "doc": gCmd = cmdDoc loadConfigs(DocConfig, cache) defineSymbol("nimdoc") @@ -217,6 +221,13 @@ proc mainCommand*(graph: ModuleGraph; cache: IdentCache) = wantMainModule() defineSymbol("nimdoc") commandDoc2(graph, cache, true) + of "ctags": + wantMainModule() + gCmd = cmdDoc + loadConfigs(DocConfig, cache) + wantMainModule() + defineSymbol("nimdoc") + commandTags() of "buildindex": gCmd = cmdDoc loadConfigs(DocConfig, cache) @@ -270,6 +281,9 @@ proc mainCommand*(graph: ModuleGraph; cache: IdentCache) = of "nop", "help": # prevent the "success" message: gCmd = cmdDump + of "jsonscript": + gCmd = cmdJsonScript + commandJsonScript(graph, cache) else: rawMessage(errInvalidCommandX, command) |