mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
fixed a regression in nimrod i
This commit is contained in:
@@ -324,7 +324,7 @@ proc InteractivePasses =
|
||||
var stdinModule: PSym
|
||||
proc makeStdinModule: PSym =
|
||||
if stdinModule == nil:
|
||||
stdinModule = newModule(gCmdLineInfo.fileIndex)
|
||||
stdinModule = newModule(fileInfoIdx"stdin")
|
||||
stdinModule.id = getID()
|
||||
result = stdinModule
|
||||
|
||||
@@ -333,7 +333,7 @@ proc CommandInteractive =
|
||||
InteractivePasses()
|
||||
compileSystemModule()
|
||||
if commandArgs.len > 0:
|
||||
discard CompileModule(gProjectMainIdx, {})
|
||||
discard CompileModule(fileInfoIdx(gProjectFull), {})
|
||||
else:
|
||||
var m = makeStdinModule()
|
||||
incl(m.flags, sfMainModule)
|
||||
|
||||
@@ -485,7 +485,8 @@ proc fileInfoIdx*(filename: string): int32 =
|
||||
result = filenameToIndexTbl[canon]
|
||||
else:
|
||||
result = fileInfos.len.int32
|
||||
fileInfos.add(newFileInfo(canon, if pseudoPath: "" else: canon.shortenDir))
|
||||
fileInfos.add(newFileInfo(canon, if pseudoPath: filename
|
||||
else: canon.shortenDir))
|
||||
filenameToIndexTbl[canon] = result
|
||||
|
||||
proc newLineInfo*(fileInfoIdx: int32, line, col: int): TLineInfo =
|
||||
|
||||
Reference in New Issue
Block a user