nimfix handles helloworld
This commit is contained in:
parent
5fb12144b3
commit
7f7b13a45f
9 changed files with 29 additions and 47 deletions
|
|
@ -185,8 +185,17 @@ proc compileSystemModule* =
|
|||
systemFileIdx = fileInfoIdx(options.libpath/"system.nim")
|
||||
discard compileModule(systemFileIdx, {sfSystemModule})
|
||||
|
||||
proc compileProject*(projectFile = gProjectMainIdx) =
|
||||
proc wantMainModule* =
|
||||
if gProjectFull.len == 0:
|
||||
fatal(gCmdLineInfo, errCommandExpectsFilename)
|
||||
gProjectMainIdx = addFileExt(gProjectFull, NimExt).fileInfoIdx
|
||||
|
||||
proc compileProject*(projectFileIdx = -1'i32) =
|
||||
wantMainModule()
|
||||
passes.gIncludeFile = includeModule
|
||||
passes.gImportModule = importModule
|
||||
let systemFileIdx = fileInfoIdx(options.libpath / "system.nim")
|
||||
let projectFile = if projectFileIdx < 0: gProjectMainIdx else: projectFileIdx
|
||||
if projectFile == systemFileIdx:
|
||||
discard compileModule(projectFile, {sfMainModule, sfSystemModule})
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue