Parser
- On initialization, bypass lexing for argv[0] (program name) and any 'rc:' and 'rc.' arguments.
This commit is contained in:
@@ -80,6 +80,15 @@ void Parser::initialize (int argc, const char** argv)
|
|||||||
branch->tag ("ORIGINAL");
|
branch->tag ("ORIGINAL");
|
||||||
branch->tag ("?");
|
branch->tag ("?");
|
||||||
|
|
||||||
|
// Do not lex argv[0].
|
||||||
|
if (i == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// Do no lex RC overrides.
|
||||||
|
if (raw.substr (0, 3) == "rc." ||
|
||||||
|
raw.substr (0, 3) == "rc:")
|
||||||
|
continue;
|
||||||
|
|
||||||
// If the argument contains a space, it was quoted. Record that fact.
|
// If the argument contains a space, it was quoted. Record that fact.
|
||||||
if (! noSpaces (raw))
|
if (! noSpaces (raw))
|
||||||
branch->tag ("QUOTED");
|
branch->tag ("QUOTED");
|
||||||
|
|||||||
Reference in New Issue
Block a user