support for --cs:partial
This commit is contained in:
parent
c11398ea0d
commit
367abca382
3 changed files with 14 additions and 2 deletions
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
import
|
import
|
||||||
os, msgs, options, nversion, condsyms, strutils, extccomp, platform, lists,
|
os, msgs, options, nversion, condsyms, strutils, extccomp, platform, lists,
|
||||||
wordrecg, parseutils, babelcmd
|
wordrecg, parseutils, babelcmd, idents
|
||||||
|
|
||||||
proc writeCommandLineUsage*()
|
proc writeCommandLineUsage*()
|
||||||
|
|
||||||
|
|
@ -512,6 +512,13 @@ proc processSwitch(switch, arg: string, pass: TCmdlinePass, info: TLineInfo) =
|
||||||
gListFullPaths = true
|
gListFullPaths = true
|
||||||
of "dynliboverride":
|
of "dynliboverride":
|
||||||
dynlibOverride(switch, arg, pass, info)
|
dynlibOverride(switch, arg, pass, info)
|
||||||
|
of "cs":
|
||||||
|
expectArg(switch, arg, pass, info)
|
||||||
|
case arg
|
||||||
|
of "partial": idents.firstCharIsCS = true
|
||||||
|
of "none": idents.firstCharIsCS = false
|
||||||
|
else: LocalError(info, errGenerated,
|
||||||
|
"'partial' or 'none' expected, but found " & arg)
|
||||||
else:
|
else:
|
||||||
if strutils.find(switch, '.') >= 0: options.setConfigVar(switch, arg)
|
if strutils.find(switch, '.') >= 0: options.setConfigVar(switch, arg)
|
||||||
else: InvalidCmdLineOption(pass, switch, info)
|
else: InvalidCmdLineOption(pass, switch, info)
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,13 @@ type
|
||||||
s*: string
|
s*: string
|
||||||
next*: PIdent # for hash-table chaining
|
next*: PIdent # for hash-table chaining
|
||||||
h*: THash # hash value of s
|
h*: THash # hash value of s
|
||||||
|
|
||||||
|
var firstCharIsCS*: bool
|
||||||
var buckets*: array[0..4096 * 2 - 1, PIdent]
|
var buckets*: array[0..4096 * 2 - 1, PIdent]
|
||||||
|
|
||||||
proc cmpIgnoreStyle(a, b: cstring, blen: int): int =
|
proc cmpIgnoreStyle(a, b: cstring, blen: int): int =
|
||||||
|
if firstCharIsCS:
|
||||||
|
if a[0] != b[0]: return 1
|
||||||
var i = 0
|
var i = 0
|
||||||
var j = 0
|
var j = 0
|
||||||
result = 1
|
result = 1
|
||||||
|
|
|
||||||
|
|
@ -85,4 +85,6 @@ Advanced options:
|
||||||
--parallelBuild=0|1|... perform a parallel build
|
--parallelBuild=0|1|... perform a parallel build
|
||||||
value = number of processors (0 for auto-detect)
|
value = number of processors (0 for auto-detect)
|
||||||
--verbosity:0|1|2|3 set Nimrod's verbosity level (1 is default)
|
--verbosity:0|1|2|3 set Nimrod's verbosity level (1 is default)
|
||||||
|
--cs:none|partial set case sensitivity level (default: none);
|
||||||
|
do not use! this setting affects the whole language
|
||||||
-v, --version show detailed version information
|
-v, --version show detailed version information
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue