Duration Bug
- Removed the unnecessary ::getInt parse before ::getNumber, which was causing "-1.2d" to not parse. - Removed verbose debug statement.
This commit is contained in:
@@ -718,6 +718,7 @@ const A3 A3::tokenize (const A3& input) const
|
||||
|
||||
// Must be higher than number.
|
||||
// Must be higher than operator.
|
||||
// Note that Nibbler::getDate does not read durations.
|
||||
else if (n.getDate (date_format, t))
|
||||
{
|
||||
output.push_back (Arg (Date (t).toString (date_format), Arg::type_date, Arg::cat_literal));
|
||||
@@ -1500,13 +1501,11 @@ bool A3::is_duration (Nibbler& n, std::string& result)
|
||||
{
|
||||
std::string::size_type start = n.save ();
|
||||
|
||||
int i;
|
||||
double d;
|
||||
std::string unit;
|
||||
std::vector <std::string> units = Duration::get_units ();
|
||||
|
||||
if ((n.getInt (i) ||
|
||||
n.getNumber (d)) &&
|
||||
if (n.getNumber (d) &&
|
||||
n.getOneOf (units, unit))
|
||||
{
|
||||
char next = n.next ();
|
||||
|
||||
@@ -418,7 +418,7 @@ 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";
|
||||
// std::cout << "# Command::modify_task name='" << name << "' value='" << value << "'\n";
|
||||
|
||||
// Get the column info.
|
||||
Column* column = context.columns[name];
|
||||
|
||||
Reference in New Issue
Block a user