From 7ad99cb7faecc4acc59b7d9788a71a12f36dc94a Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 2 Nov 2014 22:19:20 -0500 Subject: [PATCH] Context - Removed last calls to Parser::. --- src/Context.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index f8c71e1bb..b1d23756b 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -34,7 +34,6 @@ #include #include #include -#include // TODO Remove #include #include #include @@ -131,7 +130,7 @@ int Context::initialize (int argc, const char** argv) // Assume default .taskrc and .task locations. assumeLocations (); - // The parser needs all the help it can get. + // The CLI parser needs all the help it can get. setupEntities (); // Scan command line for 'rc:' only. @@ -151,18 +150,12 @@ int Context::initialize (int argc, const char** argv) config.load (rc_file); loadAliases (); - // These are needed in Parser::initialize. + // These are useful for parsing. Lexer::dateFormat = config.get ("dateformat"); Variant::dateFormat = config.get ("dateformat"); Variant::searchCaseSensitive = config.getBoolean ("search.case.sensitive"); Variant::searchUsingRegex = config.getBoolean ("regex"); - Parser parser; - parser.initialize (argc, argv); // task arg0 arg1 ... - - // Process 'rc:' command line override. - parser.findOverrides (); // rc: rc.: - // The data location, Context::data_dir, is determined from the assumed // location (~/.task), or set by data.location in the config file, or // overridden by rc.data.location on the command line. @@ -404,7 +397,7 @@ int Context::run () } //////////////////////////////////////////////////////////////////////////////// -// Dispatch to the command found by the parser. +// Dispatch to the command found by the CLI parser. int Context::dispatch (std::string &out) { // Autocomplete args against keywords.