refactoring: removed cmdlinehelper.mainCommand callback
This commit is contained in:
parent
c2c7f60259
commit
3492178494
5 changed files with 32 additions and 32 deletions
|
|
@ -22,7 +22,7 @@ import
|
|||
commands, options, msgs,
|
||||
extccomp, strutils, os, main, parseopt,
|
||||
idents, lineinfos, cmdlinehelper,
|
||||
pathutils
|
||||
pathutils, modulegraphs
|
||||
|
||||
from std/browsers import openDefaultBrowser
|
||||
from nodejs import findNodeJs
|
||||
|
|
@ -70,8 +70,7 @@ proc processCmdLine(pass: TCmdLinePass, cmd: string; config: ConfigRef) =
|
|||
proc handleCmdLine(cache: IdentCache; conf: ConfigRef) =
|
||||
let self = NimProg(
|
||||
supportsStdinFile: true,
|
||||
processCmdLine: processCmdLine,
|
||||
mainCommand: mainCommand
|
||||
processCmdLine: processCmdLine
|
||||
)
|
||||
self.initDefinesProg(conf, "nim_compiler")
|
||||
if paramCount() == 0:
|
||||
|
|
@ -79,7 +78,9 @@ proc handleCmdLine(cache: IdentCache; conf: ConfigRef) =
|
|||
return
|
||||
|
||||
self.processCmdLineAndProjectPath(conf)
|
||||
if not self.loadConfigsAndRunMainCommand(cache, conf): return
|
||||
var graph = newModuleGraph(cache, conf)
|
||||
if not self.loadConfigsAndRunMainCommand(cache, conf, graph): return
|
||||
mainCommand(graph)
|
||||
if conf.hasHint(hintGCStats): echo(GC_getStatistics())
|
||||
#echo(GC_getStatistics())
|
||||
if conf.errorCounter != 0: return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue