mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 14:00:35 +00:00
cosmetic improvements
* remove unused imports * make 'openPars' and 'closedPars' more readable
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
when not defined(nimpretty):
|
||||
{.error: "This needs to be compiled with --define:nimPretty".}
|
||||
|
||||
import ../compiler / [idents, msgs, ast, syntaxes, renderer, options,
|
||||
pathutils, layouter]
|
||||
import ../compiler / [idents, msgs, syntaxes, options, pathutils, layouter]
|
||||
|
||||
import parseopt, strutils, os
|
||||
|
||||
|
||||
Reference in New Issue
Block a user