summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authornarimiran <narimiran@disroot.org>2019-08-19 13:27:58 +0200
committernarimiran <narimiran@disroot.org>2019-08-19 13:29:45 +0200
commitcf4390a24adde453cd3a4a1e4889305b61b295e4 (patch)
treec0b601d8b06fd24a766fdd45355ae6660bd86d8a /compiler
parent742862b847646dff4562992cd502d3077b2c9474 (diff)
downloadNim-cf4390a24adde453cd3a4a1e4889305b61b295e4.tar.gz
cosmetic improvements
* remove unused imports
* make 'openPars' and 'closedPars' more readable
Diffstat (limited to 'compiler')
-rw-r--r--compiler/layouter.nim13
1 files changed, 5 insertions, 8 deletions
diff --git a/compiler/layouter.nim b/compiler/layouter.nim
index 367d2aead..7df32ec4c 100644
--- a/compiler/layouter.nim
+++ b/compiler/layouter.nim
@@ -9,10 +9,7 @@
 
 ## Layouter for nimpretty.
 
-import idents, lexer, lineinfos, llstream, options, msgs, strutils,
-  pathutils
-from os import changeFileExt
-from sequtils import delete
+import idents, lexer, lineinfos, llstream, options, msgs, strutils, pathutils
 
 const
   MinLineLen = 15
@@ -314,11 +311,11 @@ proc removeSpaces(em: var Emitter) =
 
 const
   openPars = {tkParLe, tkParDotLe,
-              tkBracketLe, tkBracketLeColon, tkCurlyDotLe,
-              tkCurlyLe}
+              tkBracketLe, tkBracketDotLe, tkBracketLeColon,
+              tkCurlyDotLe, tkCurlyLe}
   closedPars = {tkParRi, tkParDotRi,
-              tkBracketRi, tkCurlyDotRi,
-              tkCurlyRi, tkBracketDotRi}
+                tkBracketRi, tkBracketDotRi,
+                tkCurlyDotRi, tkCurlyRi}
 
   splitters = openPars + {tkComma, tkSemiColon} # do not add 'tkColon' here!
   oprSet = {tkOpr, tkDiv, tkMod, tkShl, tkShr, tkIn, tkNotin, tkIs,