mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Parser Integration
- New parser integrated and functioning, but only shadows the A3 parser. In debug mode, there is new output, but that's all that happenѕ.
This commit is contained in:
parent
9ee17a5b51
commit
314d0e9d01
4 changed files with 26 additions and 2 deletions
|
@ -81,6 +81,16 @@ int Context::initialize (int argc, const char** argv)
|
|||
|
||||
try
|
||||
{
|
||||
// BEGIN EXPERIMENTAL CODE
|
||||
|
||||
// Initialize the command line parser.
|
||||
a3t.initialize (argc, argv);
|
||||
Tree* parseTree = a3t.parse ();
|
||||
|
||||
// END EXPERIMENTAL CODE
|
||||
|
||||
|
||||
|
||||
// char** argv --> std::vector <std::string> Context::a3.
|
||||
a3.capture (argc, argv);
|
||||
|
||||
|
@ -165,6 +175,18 @@ int Context::initialize (int argc, const char** argv)
|
|||
a3.categorize ();
|
||||
a3.dump ("Context::initialize");
|
||||
|
||||
|
||||
|
||||
// BEGIN EXPERIMENTAL CODE
|
||||
|
||||
// Initialize the command line parser.
|
||||
if (parseTree && config.getBoolean ("debug"))
|
||||
parseTree->dump ();
|
||||
|
||||
// END EXPERIMENTAL CODE
|
||||
|
||||
|
||||
|
||||
// TODO Instantiate extension command objects.
|
||||
// TODO Instantiate default command object.
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include <File.h>
|
||||
#include <Directory.h>
|
||||
#include <A3.h>
|
||||
#include <A3t.h>
|
||||
#include <Timer.h>
|
||||
|
||||
class Context
|
||||
|
@ -83,6 +84,7 @@ private:
|
|||
public:
|
||||
std::string program;
|
||||
A3 a3;
|
||||
A3t a3t;
|
||||
std::string home_dir;
|
||||
File rc_file;
|
||||
Path data_dir;
|
||||
|
|
|
@ -50,7 +50,7 @@ A3t::~A3t ()
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void A3t::initialize (int argc, char** argv)
|
||||
void A3t::initialize (int argc, const char** argv)
|
||||
{
|
||||
for (int i = 0; i < argc; ++i)
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@ class A3t
|
|||
public:
|
||||
A3t ();
|
||||
~A3t ();
|
||||
void initialize (int, char**);
|
||||
void initialize (int, const char**);
|
||||
Tree* parse ();
|
||||
void entity (const std::string&, const std::string&);
|
||||
bool canonicalize (std::string&, const std::string&, const std::string&) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue