fixes the new to be documented imports
This commit is contained in:
parent
e32bfef5cc
commit
eee43e4f8f
1 changed files with 4 additions and 2 deletions
|
|
@ -98,6 +98,7 @@ proc resolveDollar(project, source, pkg, subdir: string; info: TLineInfo): strin
|
||||||
|
|
||||||
proc scriptableImport(pkg, sub: string; info: TLineInfo): string =
|
proc scriptableImport(pkg, sub: string; info: TLineInfo): string =
|
||||||
result = resolveDollar(gProjectFull, info.toFullPath(), pkg, sub, info)
|
result = resolveDollar(gProjectFull, info.toFullPath(), pkg, sub, info)
|
||||||
|
if result.isNil: result = ""
|
||||||
|
|
||||||
proc lookupPackage(pkg, subdir: PNode): string =
|
proc lookupPackage(pkg, subdir: PNode): string =
|
||||||
let sub = if subdir != nil: renderTree(subdir, {renderNoComments}).replace(" ") else: ""
|
let sub = if subdir != nil: renderTree(subdir, {renderNoComments}).replace(" ") else: ""
|
||||||
|
|
@ -166,7 +167,8 @@ proc checkModuleName*(n: PNode; doLocalError=true): int32 =
|
||||||
let fullPath = findModule(modulename, n.info.toFullPath)
|
let fullPath = findModule(modulename, n.info.toFullPath)
|
||||||
if fullPath.len == 0:
|
if fullPath.len == 0:
|
||||||
if doLocalError:
|
if doLocalError:
|
||||||
localError(n.info, errCannotOpenFile, modulename)
|
let m = if modulename.len > 0: modulename else: $n
|
||||||
|
localError(n.info, errCannotOpenFile, m)
|
||||||
result = InvalidFileIDX
|
result = InvalidFileIDX
|
||||||
else:
|
else:
|
||||||
result = fullPath.fileInfoIdx
|
result = fullPath.fileInfoIdx
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue