mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Parser
- ::initialize now recognizes more things it should not lex.
This commit is contained in:
parent
cfc5c08777
commit
293f4d6258
1 changed files with 19 additions and 3 deletions
|
@ -84,9 +84,25 @@ void Parser::initialize (int argc, const char** argv)
|
|||
if (i == 0)
|
||||
continue;
|
||||
|
||||
// Do no lex RC overrides.
|
||||
if (raw.substr (0, 3) == "rc." ||
|
||||
raw.substr (0, 3) == "rc:")
|
||||
// TODO This seems silly - it's essentially performing a low-quality parse.
|
||||
|
||||
// Do not lex RC overrides.
|
||||
if (raw.length () > 3 &&
|
||||
(raw.substr (0, 3) == "rc." ||
|
||||
raw.substr (0, 3) == "rc:"))
|
||||
continue;
|
||||
|
||||
// Do not lex patterns or single substitutions.
|
||||
if (raw.length () > 2 &&
|
||||
raw[0] == '/' &&
|
||||
raw[raw.length () - 1] == '/')
|
||||
continue;
|
||||
|
||||
// Do not lex substitutions.
|
||||
if (raw.length () > 2 &&
|
||||
raw[0] == '/' &&
|
||||
raw[raw.length () - 2] == '/' &&
|
||||
raw[raw.length () - 1] == 'g')
|
||||
continue;
|
||||
|
||||
// If the argument contains a space, it was quoted. Record that fact.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue