nimfix now in its own directory; single file mode now the default
This commit is contained in:
parent
3354f7e098
commit
da0fab7046
8 changed files with 12 additions and 8 deletions
|
|
@ -234,7 +234,9 @@ proc processPath(path: string, notRelativeToProj = false): string =
|
||||||
path
|
path
|
||||||
else:
|
else:
|
||||||
options.gProjectPath / path
|
options.gProjectPath / path
|
||||||
result = unixToNativePath(p % ["nimrod", getPrefixDir(), "lib", libpath,
|
result = unixToNativePath(p % ["nimrod", getPrefixDir(),
|
||||||
|
"nim", getPrefixDir(),
|
||||||
|
"lib", libpath,
|
||||||
"home", removeTrailingDirSep(os.getHomeDir()),
|
"home", removeTrailingDirSep(os.getHomeDir()),
|
||||||
"projectname", options.gProjectName,
|
"projectname", options.gProjectName,
|
||||||
"projectpath", options.gProjectPath])
|
"projectpath", options.gProjectPath])
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
import
|
import
|
||||||
intsets, ast, astalgo, idents, semdata, types, msgs, options, rodread,
|
intsets, ast, astalgo, idents, semdata, types, msgs, options, rodread,
|
||||||
renderer, wordrecg, idgen, prettybase
|
renderer, wordrecg, idgen, nimfix.prettybase
|
||||||
|
|
||||||
proc ensureNoMissingOrUnusedSymbols(scope: PScope)
|
proc ensureNoMissingOrUnusedSymbols(scope: PScope)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ Usage:
|
||||||
Options:
|
Options:
|
||||||
--overwriteFiles:on|off overwrite the original nim files.
|
--overwriteFiles:on|off overwrite the original nim files.
|
||||||
DEFAULT is ON!
|
DEFAULT is ON!
|
||||||
--onlyMainfile overwrite only the main file.
|
--wholeProject overwrite every processed file.
|
||||||
--checkExtern:on|off style check also extern names
|
--checkExtern:on|off style check also extern names
|
||||||
--styleCheck:on|off|auto performs style checking for identifiers
|
--styleCheck:on|off|auto performs style checking for identifiers
|
||||||
and suggests an alternative spelling;
|
and suggests an alternative spelling;
|
||||||
|
|
@ -46,6 +46,7 @@ proc mainCommand =
|
||||||
proc processCmdLine*(pass: TCmdLinePass, cmd: string) =
|
proc processCmdLine*(pass: TCmdLinePass, cmd: string) =
|
||||||
var p = parseopt.initOptParser(cmd)
|
var p = parseopt.initOptParser(cmd)
|
||||||
var argsCount = 0
|
var argsCount = 0
|
||||||
|
gOnlyMainfile = true
|
||||||
while true:
|
while true:
|
||||||
parseopt.next(p)
|
parseopt.next(p)
|
||||||
case p.kind
|
case p.kind
|
||||||
|
|
@ -68,7 +69,7 @@ proc processCmdLine*(pass: TCmdLinePass, cmd: string) =
|
||||||
of "on": gStyleCheck = StyleCheck.Warn
|
of "on": gStyleCheck = StyleCheck.Warn
|
||||||
of "auto": gStyleCheck = StyleCheck.Auto
|
of "auto": gStyleCheck = StyleCheck.Auto
|
||||||
else: localError(gCmdLineInfo, errOnOrOffExpected)
|
else: localError(gCmdLineInfo, errOnOrOffExpected)
|
||||||
of "onlymainfile": gOnlyMainfile = true
|
of "wholeproject": gOnlyMainfile = false
|
||||||
else:
|
else:
|
||||||
processSwitch(pass, p)
|
processSwitch(pass, p)
|
||||||
of cmdArgument:
|
of cmdArgument:
|
||||||
|
|
@ -2,9 +2,10 @@
|
||||||
# gc:markAndSweep
|
# gc:markAndSweep
|
||||||
|
|
||||||
hint[XDeclaredButNotUsed]:off
|
hint[XDeclaredButNotUsed]:off
|
||||||
path:"$projectPath/.."
|
path:"$projectPath/../.."
|
||||||
|
|
||||||
path:"$lib/packages/docutils"
|
path:"$lib/packages/docutils"
|
||||||
|
path:"$nim/compiler"
|
||||||
|
|
||||||
define:useStdoutAsStdmsg
|
define:useStdoutAsStdmsg
|
||||||
symbol:nimfix
|
symbol:nimfix
|
||||||
|
|
@ -15,11 +15,11 @@ import
|
||||||
magicsys, parser, nversion, nimsets, semfold, importer,
|
magicsys, parser, nversion, nimsets, semfold, importer,
|
||||||
procfind, lookups, rodread, pragmas, passes, semdata, semtypinst, sigmatch,
|
procfind, lookups, rodread, pragmas, passes, semdata, semtypinst, sigmatch,
|
||||||
intsets, transf, vmdef, vm, idgen, aliases, cgmeth, lambdalifting,
|
intsets, transf, vmdef, vm, idgen, aliases, cgmeth, lambdalifting,
|
||||||
evaltempl, patterns, parampatterns, sempass2, pretty, semmacrosanity,
|
evaltempl, patterns, parampatterns, sempass2, nimfix.pretty, semmacrosanity,
|
||||||
semparallel, lowerings
|
semparallel, lowerings
|
||||||
|
|
||||||
when defined(nimfix):
|
when defined(nimfix):
|
||||||
import prettybase
|
import nimfix.prettybase
|
||||||
|
|
||||||
# implementation
|
# implementation
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
import
|
import
|
||||||
intsets, ast, astalgo, semdata, types, msgs, renderer, lookups, semtypinst,
|
intsets, ast, astalgo, semdata, types, msgs, renderer, lookups, semtypinst,
|
||||||
magicsys, condsyms, idents, lexer, options, parampatterns, strutils, trees,
|
magicsys, condsyms, idents, lexer, options, parampatterns, strutils, trees,
|
||||||
pretty
|
nimfix.pretty
|
||||||
|
|
||||||
when not defined(noDocgen):
|
when not defined(noDocgen):
|
||||||
import docgen
|
import docgen
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue