Enhancement - Integrated Subst
- Subst is now part of Context.
This commit is contained in:
@@ -42,6 +42,7 @@ Context::Context ()
|
||||
, filter ()
|
||||
, keymap ()
|
||||
, sequence ()
|
||||
, subst ()
|
||||
, task ()
|
||||
, tdb ()
|
||||
, stringtable ()
|
||||
@@ -63,6 +64,7 @@ Context::Context (const Context& other)
|
||||
filter = other.filter;
|
||||
keymap = other.keymap;
|
||||
sequence = other.sequence;
|
||||
subst = other.subst;
|
||||
task = other.task;
|
||||
tdb = other.tdb;
|
||||
stringtable = other.stringtable;
|
||||
@@ -82,6 +84,7 @@ Context& Context::operator= (const Context& other)
|
||||
filter = other.filter;
|
||||
keymap = other.keymap;
|
||||
sequence = other.sequence;
|
||||
subst = other.subst;
|
||||
task = other.task;
|
||||
tdb = other.tdb;
|
||||
stringtable = other.stringtable;
|
||||
@@ -300,16 +303,17 @@ void Context::parse ()
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
// Substitution of description text.
|
||||
else if (validSubstitution (arg, from, to, global))
|
||||
// Substitution of description and/or annotation text.
|
||||
else if (subst.valid (*arg))
|
||||
{
|
||||
if (foundSequence)
|
||||
foundSomethingAfterSequence = true;
|
||||
|
||||
task.setSubstitution (from, to, global);
|
||||
std::cout << "# found subst" << std::endl;
|
||||
subst.parse (*arg);
|
||||
}
|
||||
|
||||
/*
|
||||
// Command.
|
||||
else if (command == "")
|
||||
{
|
||||
@@ -326,6 +330,7 @@ void Context::parse ()
|
||||
descCandidate += arg;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// Anything else is just considered description.
|
||||
else
|
||||
@@ -335,10 +340,10 @@ void Context::parse ()
|
||||
|
||||
if (descCandidate.length ())
|
||||
descCandidate += " ";
|
||||
descCandidate += arg;
|
||||
descCandidate += *arg;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// terminated, therefore everything subsequently is a description.
|
||||
else
|
||||
{
|
||||
@@ -354,9 +359,6 @@ void Context::parse ()
|
||||
|
||||
if (validDescription (descCandidate))
|
||||
task.set ("description", descCandidate);
|
||||
|
||||
// TODO Replace parse.cpp:parse
|
||||
throw std::string ("unimplemented Context::parse");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "Keymap.h"
|
||||
#include "Config.h"
|
||||
#include "Sequence.h"
|
||||
#include "Subst.h"
|
||||
#include "T2.h"
|
||||
#include "TDB2.h"
|
||||
#include "StringTable.h"
|
||||
@@ -59,6 +60,7 @@ public:
|
||||
Filter filter;
|
||||
Keymap keymap;
|
||||
Sequence sequence;
|
||||
Subst subst;
|
||||
T2 task;
|
||||
TDB2 tdb;
|
||||
StringTable stringtable;
|
||||
|
||||
@@ -4,7 +4,8 @@ LFLAGS =
|
||||
LIBS =
|
||||
OBJECTS = main.o ../Context.o ../TDB2.o ../T2.o ../Sequence.o ../Filter.o \
|
||||
../Att.o ../Keymap.o ../Record.o ../StringTable.o ../Location.o \
|
||||
../util.o ../text.o ../Date.o ../Config.o ../Subst.o ../Nibbler.o
|
||||
../util.o ../text.o ../Date.o ../Config.o ../Subst.o ../Nibbler.o \
|
||||
../parse.o ../Duration.o ../T.o
|
||||
|
||||
all: $(PROJECT)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user