Expressions

- Eliminated the . prefix for DOM references to the current task - it is
  unnatural to state ".due < today".
- Prioritized parsing dates ahead of integers, which were masking all
  dates.
This commit is contained in:
Paul Beckingham 2011-07-19 00:25:26 -04:00
parent e564827be7
commit 09d94a0712
7 changed files with 27 additions and 25 deletions

View file

@ -255,9 +255,9 @@ const std::string DOM::get (const std::string& name, const Task& task)
}
}
// [<task>] .<name>
if (name == ".id") return format (task.id);
else if (name == ".urgency") return format (task.urgency_c (), 4, 3);
// [<task>.]<name>
if (name == "id") return format (task.id);
else if (name == "urgency") return format (task.urgency_c (), 4, 3);
else if (task.has (name.substr (1))) return task.get (name.substr (1));
// Delegate to the context-free version of DOM::get.