summary refs log tree commit diff stats
path: root/compiler/layouter.nim
diff options
context:
space:
mode:
authorCharles Blake <charlechaud@gmail.com>2019-06-13 10:21:11 -0400
committerCharles Blake <charlechaud@gmail.com>2019-06-13 10:21:11 -0400
commite11d582fa1562128b74f597620958e40e849b855 (patch)
treed0be6597a78ff50d15666027f4f3811a22a98eb3 /compiler/layouter.nim
parente7188cdfa84f1a09748b66e1edfcbd3245b9ac60 (diff)
parent06ef56ba72bbefc389263296e70617b70ffe09a6 (diff)
downloadNim-e11d582fa1562128b74f597620958e40e849b855.tar.gz
Merge branch 'devel' of https://github.com/nim-lang/Nim into devel
Diffstat (limited to 'compiler/layouter.nim')
-rw-r--r--compiler/layouter.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/layouter.nim b/compiler/layouter.nim
index 3ac907f1d..057bad5ba 100644
--- a/compiler/layouter.nim
+++ b/compiler/layouter.nim
@@ -346,7 +346,7 @@ proc emitTok*(em: var Emitter; L: TLexer; tok: TToken) =
     if endsInAlpha(em):
       wrSpace em
     elif not em.inquote and not endsInWhite(em) and
-        em.lastTok notin openPars and not em.lastTokWasTerse:
+        em.lastTok notin (openPars+{tkOpr, tkDotDot}) and not em.lastTokWasTerse:
       #and tok.tokType in oprSet
       wrSpace em
 
@@ -392,8 +392,8 @@ proc emitTok*(em: var Emitter; L: TLexer; tok: TToken) =
     wr(em, TokTypeToStr[tok.tokType], ltOther)
     if not em.inquote: wrSpace(em)
   of tkOpr, tkDotDot:
-    if ((tok.strongSpaceA == 0 and tok.strongSpaceB == 0) or em.inquote) and
-      tok.ident.s notin ["<", ">", "<=", ">=", "==", "!="]:
+    if em.inquote or ((tok.strongSpaceA == 0 and tok.strongSpaceB == 0) and
+        tok.ident.s notin ["<", ">", "<=", ">=", "==", "!="]):
       # bug #9504: remember to not spacify a keyword:
       lastTokWasTerse = true
       # if not surrounded by whitespace, don't produce any whitespace either: