fixed a regression in nimrod i
This commit is contained in:
parent
31134a6bae
commit
0d77909b17
2 changed files with 4 additions and 3 deletions
|
|
@ -324,7 +324,7 @@ proc InteractivePasses =
|
||||||
var stdinModule: PSym
|
var stdinModule: PSym
|
||||||
proc makeStdinModule: PSym =
|
proc makeStdinModule: PSym =
|
||||||
if stdinModule == nil:
|
if stdinModule == nil:
|
||||||
stdinModule = newModule(gCmdLineInfo.fileIndex)
|
stdinModule = newModule(fileInfoIdx"stdin")
|
||||||
stdinModule.id = getID()
|
stdinModule.id = getID()
|
||||||
result = stdinModule
|
result = stdinModule
|
||||||
|
|
||||||
|
|
@ -333,7 +333,7 @@ proc CommandInteractive =
|
||||||
InteractivePasses()
|
InteractivePasses()
|
||||||
compileSystemModule()
|
compileSystemModule()
|
||||||
if commandArgs.len > 0:
|
if commandArgs.len > 0:
|
||||||
discard CompileModule(gProjectMainIdx, {})
|
discard CompileModule(fileInfoIdx(gProjectFull), {})
|
||||||
else:
|
else:
|
||||||
var m = makeStdinModule()
|
var m = makeStdinModule()
|
||||||
incl(m.flags, sfMainModule)
|
incl(m.flags, sfMainModule)
|
||||||
|
|
|
||||||
|
|
@ -485,7 +485,8 @@ proc fileInfoIdx*(filename: string): int32 =
|
||||||
result = filenameToIndexTbl[canon]
|
result = filenameToIndexTbl[canon]
|
||||||
else:
|
else:
|
||||||
result = fileInfos.len.int32
|
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
|
filenameToIndexTbl[canon] = result
|
||||||
|
|
||||||
proc newLineInfo*(fileInfoIdx: int32, line, col: int): TLineInfo =
|
proc newLineInfo*(fileInfoIdx: int32, line, col: int): TLineInfo =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue