mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
E9
- Working towards arg date/duration eval.
This commit is contained in:
parent
e5ae145df2
commit
ffa5bc43fe
9 changed files with 74 additions and 129 deletions
|
@ -409,13 +409,19 @@ void Command::modify_task (
|
|||
A3::extract_attr (arg->_raw, name, value);
|
||||
if (A3::is_attribute (name, name)) // Canonicalize
|
||||
{
|
||||
std::cout << "# Command::modify_task name='" << name << "' value='" << value << "'\n";
|
||||
|
||||
// All values must be eval'd first.
|
||||
A3 fragment;
|
||||
fragment.push_back (Arg (value, "attr"));
|
||||
fragment.capture (value);
|
||||
fragment = fragment.tokenize (fragment);
|
||||
E9 e (fragment);
|
||||
std::string result = e.evalExpression (task);
|
||||
context.debug (std::string ("Eval '") + value + "' --> '" + result + "'");
|
||||
|
||||
fragment.dump ("pre modify_task attr");
|
||||
std::cout << "# modify_task result='" << result << "'\n";
|
||||
|
||||
// Dependencies must be resolved to UUIDs.
|
||||
if (name == "depends")
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue