summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2016-10-12 17:52:29 +0200
committerAraq <rumpf_a@web.de>2016-10-12 17:52:29 +0200
commit6ade7c0e0d0a1b96b240f91ddbc4e3c44d7178fd (patch)
tree3420923bed37b5acecd286c8c4e0a18ea8250cfd
parent00b749c41810efe8169e5eeaea932ee63024738d (diff)
downloadNim-6ade7c0e0d0a1b96b240f91ddbc4e3c44d7178fd.tar.gz
adapting the lexer for curlysyn
-rw-r--r--compiler/lexer.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/lexer.nim b/compiler/lexer.nim
index 9c513034b..d0e818d40 100644
--- a/compiler/lexer.nim
+++ b/compiler/lexer.nim
@@ -127,7 +127,7 @@ type
                               # this is needed because scanning comments
                               # needs so much look-ahead
     currLineIndent*: int
-    strongSpaces*: bool
+    strongSpaces*, allowTabs*: bool
     errorHandler*: TErrorHandler
 
 var gLinesCompiled*: int  # all lines that have been compiled
@@ -915,7 +915,7 @@ proc skip(L: var TLexer, tok: var TToken) =
       inc(pos)
       inc(tok.strongSpaceA)
     of '\t':
-      lexMessagePos(L, errTabulatorsAreNotAllowed, pos)
+      if not L.allowTabs: lexMessagePos(L, errTabulatorsAreNotAllowed, pos)
       inc(pos)
     of CR, LF:
       pos = handleCRLF(L, pos)