summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-11-30 19:57:23 +0100
committerAraq <rumpf_a@web.de>2012-11-30 19:57:23 +0100
commitf503439e811d822f19daa9591cb3bd9e90edabe7 (patch)
treea023fbae103424bb85b16d1c4a9ac6ce2394f828 /compiler
parent92e10e4b182f4b106db79f4be228e19b2720d043 (diff)
downloadNim-f503439e811d822f19daa9591cb3bd9e90edabe7.tar.gz
implements 'import dir/module' without quotes
Diffstat (limited to 'compiler')
-rwxr-xr-xcompiler/importer.nim8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/importer.nim b/compiler/importer.nim
index b3821746c..11fc45601 100755
--- a/compiler/importer.nim
+++ b/compiler/importer.nim
@@ -29,9 +29,11 @@ proc getModuleName*(n: PNode): string =
   of nkSym:
     result = n.sym.name.s
   else:
-    localError(n.info, errGenerated,
-      "invalide module name: '$1'" % renderTree(n))
-    result = ""
+    # hacky way to implement 'x / y /../ z':
+    result = renderTree(n, {renderNoComments}).replace(" ")
+    #localError(n.info, errGenerated,
+    #  "invalide module name: '$1'" % renderTree(n))
+    #result = ""
 
 proc checkModuleName*(n: PNode): string =
   # This returns the full canonical path for a given module import