mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
support for --cs:partial
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
import
|
||||
os, msgs, options, nversion, condsyms, strutils, extccomp, platform, lists,
|
||||
wordrecg, parseutils, babelcmd
|
||||
wordrecg, parseutils, babelcmd, idents
|
||||
|
||||
proc writeCommandLineUsage*()
|
||||
|
||||
@@ -512,6 +512,13 @@ proc processSwitch(switch, arg: string, pass: TCmdlinePass, info: TLineInfo) =
|
||||
gListFullPaths = true
|
||||
of "dynliboverride":
|
||||
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:
|
||||
if strutils.find(switch, '.') >= 0: options.setConfigVar(switch, arg)
|
||||
else: InvalidCmdLineOption(pass, switch, info)
|
||||
|
||||
@@ -24,10 +24,13 @@ type
|
||||
s*: string
|
||||
next*: PIdent # for hash-table chaining
|
||||
h*: THash # hash value of s
|
||||
|
||||
|
||||
var firstCharIsCS*: bool
|
||||
var buckets*: array[0..4096 * 2 - 1, PIdent]
|
||||
|
||||
proc cmpIgnoreStyle(a, b: cstring, blen: int): int =
|
||||
if firstCharIsCS:
|
||||
if a[0] != b[0]: return 1
|
||||
var i = 0
|
||||
var j = 0
|
||||
result = 1
|
||||
|
||||
@@ -85,4 +85,6 @@ Advanced options:
|
||||
--parallelBuild=0|1|... perform a parallel build
|
||||
value = number of processors (0 for auto-detect)
|
||||
--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
|
||||
|
||||
Reference in New Issue
Block a user