summary refs log tree commit diff stats
path: root/compiler/lexer.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2017-03-09 17:09:39 +0100
committerAraq <rumpf_a@web.de>2017-03-09 17:09:39 +0100
commit57ea01309eb7ff1425fb3bc7907c67139fc50edf (patch)
treebea8226184bf8fb63b4f4acc0640e75dae97d6ef /compiler/lexer.nim
parent475579541621ca83cfcbb35df7f5d9ef4236cdfa (diff)
downloadNim-57ea01309eb7ff1425fb3bc7907c67139fc50edf.tar.gz
nimsuggest: more things work
Diffstat (limited to 'compiler/lexer.nim')
-rw-r--r--compiler/lexer.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/lexer.nim b/compiler/lexer.nim
index afdf17baa..04419d92f 100644
--- a/compiler/lexer.nim
+++ b/compiler/lexer.nim
@@ -213,7 +213,8 @@ proc openLexer*(lex: var TLexer, fileIdx: int32, inputstream: PLLStream;
   lex.currLineIndent = 0
   inc(lex.lineNumber, inputstream.lineOffset)
   lex.cache = cache
-  lex.previousToken.fileIndex = fileIdx
+  when defined(nimsuggest):
+    lex.previousToken.fileIndex = fileIdx
 
 proc openLexer*(lex: var TLexer, filename: string, inputstream: PLLStream;
                 cache: IdentCache) =