implements 'import dir/module' without quotes

This commit is contained in:
Araq 2012-11-30 19:57:23 +01:00
commit f503439e81
3 changed files with 7 additions and 5 deletions

View file

@ -29,9 +29,11 @@ proc getModuleName*(n: PNode): string =
of nkSym: of nkSym:
result = n.sym.name.s result = n.sym.name.s
else: else:
localError(n.info, errGenerated, # hacky way to implement 'x / y /../ z':
"invalide module name: '$1'" % renderTree(n)) result = renderTree(n, {renderNoComments}).replace(" ")
result = "" #localError(n.info, errGenerated,
# "invalide module name: '$1'" % renderTree(n))
#result = ""
proc checkModuleName*(n: PNode): string = proc checkModuleName*(n: PNode): string =
# This returns the full canonical path for a given module import # This returns the full canonical path for a given module import

View file

@ -1,7 +1,7 @@
# iterate over all files with a given filter: # iterate over all files with a given filter:
import import
os, times "../../lib/pure/os.nim", ../../ lib / pure / times
proc main(filter: string) = proc main(filter: string) =
for filename in walkFiles(filter): for filename in walkFiles(filter):

View file

@ -50,7 +50,7 @@ Concurrency
provide a ``syncgc`` pragma to trigger compiler injection --> more general: provide a ``syncgc`` pragma to trigger compiler injection --> more general:
an ``injectLoop`` pragma an ``injectLoop`` pragma
- 'writes: []' effect; track reads/writes for shared types - 'writes: []' effect; track reads/writes for shared types
- use the effect system to for static deadlock prevention - use the effect system for static deadlock prevention
version 0.9.XX version 0.9.XX