summary refs log tree commit diff stats
path: root/compiler/modules.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-11-06 11:19:59 +0100
committerAraq <rumpf_a@web.de>2016-11-06 17:33:33 +0100
commit2caf08855f99bbf816708a1497512d16b631289a (patch)
treee11e842ecc83f082b0377d57bbc04fb7279aeedf /compiler/modules.nim
parentfc7127153f102488f8ac4fcc2f14062eb1bac396 (diff)
downloadNim-2caf08855f99bbf816708a1497512d16b631289a.tar.gz
nimsuggest supports include files properly; added the compiler itself as a testcase
Diffstat (limited to 'compiler/modules.nim')
-rw-r--r--compiler/modules.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/modules.nim b/compiler/modules.nim
index e901ba896..68df5f756 100644
--- a/compiler/modules.nim
+++ b/compiler/modules.nim
@@ -208,6 +208,7 @@ proc includeModule*(graph: ModuleGraph; s: PSym, fileIdx: int32;
                     cache: IdentCache): PNode {.procvar.} =
   result = syntaxes.parseFile(fileIdx, cache)
   graph.addDep(s, fileIdx)
+  graph.addIncludeDep(s.position.int32, fileIdx)
 
 proc compileSystemModule*(graph: ModuleGraph; cache: IdentCache) =
   if magicsys.systemModule == nil: