cosmetic improvements
* remove unused imports * make 'openPars' and 'closedPars' more readable
This commit is contained in:
parent
742862b847
commit
cf4390a24a
2 changed files with 6 additions and 10 deletions
|
|
@ -9,10 +9,7 @@
|
||||||
|
|
||||||
## Layouter for nimpretty.
|
## Layouter for nimpretty.
|
||||||
|
|
||||||
import idents, lexer, lineinfos, llstream, options, msgs, strutils,
|
import idents, lexer, lineinfos, llstream, options, msgs, strutils, pathutils
|
||||||
pathutils
|
|
||||||
from os import changeFileExt
|
|
||||||
from sequtils import delete
|
|
||||||
|
|
||||||
const
|
const
|
||||||
MinLineLen = 15
|
MinLineLen = 15
|
||||||
|
|
@ -314,11 +311,11 @@ proc removeSpaces(em: var Emitter) =
|
||||||
|
|
||||||
const
|
const
|
||||||
openPars = {tkParLe, tkParDotLe,
|
openPars = {tkParLe, tkParDotLe,
|
||||||
tkBracketLe, tkBracketLeColon, tkCurlyDotLe,
|
tkBracketLe, tkBracketDotLe, tkBracketLeColon,
|
||||||
tkCurlyLe}
|
tkCurlyDotLe, tkCurlyLe}
|
||||||
closedPars = {tkParRi, tkParDotRi,
|
closedPars = {tkParRi, tkParDotRi,
|
||||||
tkBracketRi, tkCurlyDotRi,
|
tkBracketRi, tkBracketDotRi,
|
||||||
tkCurlyRi, tkBracketDotRi}
|
tkCurlyDotRi, tkCurlyRi}
|
||||||
|
|
||||||
splitters = openPars + {tkComma, tkSemiColon} # do not add 'tkColon' here!
|
splitters = openPars + {tkComma, tkSemiColon} # do not add 'tkColon' here!
|
||||||
oprSet = {tkOpr, tkDiv, tkMod, tkShl, tkShr, tkIn, tkNotin, tkIs,
|
oprSet = {tkOpr, tkDiv, tkMod, tkShl, tkShr, tkIn, tkNotin, tkIs,
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,7 @@
|
||||||
when not defined(nimpretty):
|
when not defined(nimpretty):
|
||||||
{.error: "This needs to be compiled with --define:nimPretty".}
|
{.error: "This needs to be compiled with --define:nimPretty".}
|
||||||
|
|
||||||
import ../compiler / [idents, msgs, ast, syntaxes, renderer, options,
|
import ../compiler / [idents, msgs, syntaxes, options, pathutils, layouter]
|
||||||
pathutils, layouter]
|
|
||||||
|
|
||||||
import parseopt, strutils, os
|
import parseopt, strutils, os
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue