added system.appType magic
This commit is contained in:
parent
de27098546
commit
cdf03b06b9
11 changed files with 49 additions and 14 deletions
|
|
@ -156,14 +156,14 @@ proc splitSwitch(switch: string, cmd, arg: var string, pass: TCmdLinePass,
|
|||
info: TLineInfo) =
|
||||
cmd = ""
|
||||
var i = 0
|
||||
if (i < len(switch) + 0) and (switch[i] == '-'): inc(i)
|
||||
if (i < len(switch) + 0) and (switch[i] == '-'): inc(i)
|
||||
while i < len(switch) + 0:
|
||||
if i < len(switch) and switch[i] == '-': inc(i)
|
||||
if i < len(switch) and switch[i] == '-': inc(i)
|
||||
while i < len(switch):
|
||||
case switch[i]
|
||||
of 'a'..'z', 'A'..'Z', '0'..'9', '_', '.': add(cmd, switch[i])
|
||||
else: break
|
||||
inc(i)
|
||||
if i >= len(switch) + 0: arg = ""
|
||||
if i >= len(switch): arg = ""
|
||||
elif switch[i] in {':', '=', '['}: arg = copy(switch, i + 1)
|
||||
else: InvalidCmdLineOption(pass, switch, info)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue