nimfix now in its own directory; single file mode now the default

This commit is contained in:
Araq
2014-10-05 23:36:47 +02:00
parent 3354f7e098
commit da0fab7046
8 changed files with 12 additions and 8 deletions

View File

@@ -234,7 +234,9 @@ proc processPath(path: string, notRelativeToProj = false): string =
path
else:
options.gProjectPath / path
result = unixToNativePath(p % ["nimrod", getPrefixDir(), "lib", libpath,
result = unixToNativePath(p % ["nimrod", getPrefixDir(),
"nim", getPrefixDir(),
"lib", libpath,
"home", removeTrailingDirSep(os.getHomeDir()),
"projectname", options.gProjectName,
"projectpath", options.gProjectPath])

View File

@@ -11,7 +11,7 @@
import
intsets, ast, astalgo, idents, semdata, types, msgs, options, rodread,
renderer, wordrecg, idgen, prettybase
renderer, wordrecg, idgen, nimfix.prettybase
proc ensureNoMissingOrUnusedSymbols(scope: PScope)

View File

@@ -21,7 +21,7 @@ Usage:
Options:
--overwriteFiles:on|off overwrite the original nim files.
DEFAULT is ON!
--onlyMainfile overwrite only the main file.
--wholeProject overwrite every processed file.
--checkExtern:on|off style check also extern names
--styleCheck:on|off|auto performs style checking for identifiers
and suggests an alternative spelling;
@@ -46,6 +46,7 @@ proc mainCommand =
proc processCmdLine*(pass: TCmdLinePass, cmd: string) =
var p = parseopt.initOptParser(cmd)
var argsCount = 0
gOnlyMainfile = true
while true:
parseopt.next(p)
case p.kind
@@ -68,7 +69,7 @@ proc processCmdLine*(pass: TCmdLinePass, cmd: string) =
of "on": gStyleCheck = StyleCheck.Warn
of "auto": gStyleCheck = StyleCheck.Auto
else: localError(gCmdLineInfo, errOnOrOffExpected)
of "onlymainfile": gOnlyMainfile = true
of "wholeproject": gOnlyMainfile = false
else:
processSwitch(pass, p)
of cmdArgument:

View File

@@ -2,9 +2,10 @@
# gc:markAndSweep
hint[XDeclaredButNotUsed]:off
path:"$projectPath/.."
path:"$projectPath/../.."
path:"$lib/packages/docutils"
path:"$nim/compiler"
define:useStdoutAsStdmsg
symbol:nimfix

View File

@@ -15,11 +15,11 @@ import
magicsys, parser, nversion, nimsets, semfold, importer,
procfind, lookups, rodread, pragmas, passes, semdata, semtypinst, sigmatch,
intsets, transf, vmdef, vm, idgen, aliases, cgmeth, lambdalifting,
evaltempl, patterns, parampatterns, sempass2, pretty, semmacrosanity,
evaltempl, patterns, parampatterns, sempass2, nimfix.pretty, semmacrosanity,
semparallel, lowerings
when defined(nimfix):
import prettybase
import nimfix.prettybase
# implementation

View File

@@ -13,7 +13,7 @@
import
intsets, ast, astalgo, semdata, types, msgs, renderer, lookups, semtypinst,
magicsys, condsyms, idents, lexer, options, parampatterns, strutils, trees,
pretty
nimfix.pretty
when not defined(noDocgen):
import docgen