mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-01 03:24:41 +00:00
compiler refactoring; use typesafe path handing; docgen: render symbols between modules
This commit is contained in:
@@ -7,9 +7,8 @@
|
||||
# distribution, for details about the copyright.
|
||||
#
|
||||
|
||||
import ast, renderer, strutils, msgs, options, idents, os, lineinfos
|
||||
|
||||
import nimblecmd
|
||||
import ast, renderer, strutils, msgs, options, idents, os, lineinfos,
|
||||
pathutils, nimblecmd
|
||||
|
||||
when false:
|
||||
const
|
||||
@@ -160,7 +159,7 @@ proc checkModuleName*(conf: ConfigRef; n: PNode; doLocalError=true): FileIndex =
|
||||
# This returns the full canonical path for a given module import
|
||||
let modulename = getModuleName(conf, n)
|
||||
let fullPath = findModule(conf, modulename, toFullPath(conf, n.info))
|
||||
if fullPath.len == 0:
|
||||
if fullPath.isEmpty:
|
||||
if doLocalError:
|
||||
let m = if modulename.len > 0: modulename else: $n
|
||||
localError(conf, n.info, "cannot open file: " & m)
|
||||
|
||||
Reference in New Issue
Block a user