changed the compiler's path handling; fixes #546
This commit is contained in:
parent
1e5926458c
commit
893be3a5a4
11 changed files with 32 additions and 17 deletions
|
|
@ -22,7 +22,11 @@ proc getModuleName*(n: PNode): string =
|
|||
# The proc won't perform any checks that the path is actually valid
|
||||
case n.kind
|
||||
of nkStrLit, nkRStrLit, nkTripleStrLit:
|
||||
result = unixToNativePath(n.strVal)
|
||||
try:
|
||||
result = pathSubs(n.strVal, n.info.toFullPath().splitFile().dir)
|
||||
except ValueError:
|
||||
localError(n.info, "invalid path: " & n.strVal)
|
||||
result = n.strVal
|
||||
of nkIdent:
|
||||
result = n.ident.s
|
||||
of nkSym:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue