* fix #12663 staticRead * address comments
This commit is contained in:
parent
04614a30bd
commit
dfe5d115fb
2 changed files with 15 additions and 12 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#
|
||||
|
||||
import ast, types, msgs, os, options, idents, lineinfos
|
||||
from pathutils import AbsoluteFile
|
||||
|
||||
proc opSlurp*(file: string, info: TLineInfo, module: PSym; conf: ConfigRef): string =
|
||||
try:
|
||||
|
|
@ -17,6 +18,7 @@ proc opSlurp*(file: string, info: TLineInfo, module: PSym; conf: ConfigRef): str
|
|||
result = readFile(filename)
|
||||
# we produce a fake include statement for every slurped filename, so that
|
||||
# the module dependencies are accurate:
|
||||
discard conf.fileInfoIdx(AbsoluteFile filename)
|
||||
appendToModule(module, newNode(nkIncludeStmt, info, @[
|
||||
newStrNode(nkStrLit, filename)]))
|
||||
except IOError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue