CLI2: Bug parsing attribute modfiiers

- Consider 'project.is:home' and 'project:home.garden'. The colon ':' and the
  dot '.' switch places and change the meaning. This was not caught by the paser.
- Removed commented call that is now merged.
This commit is contained in:
Paul Beckingham 2015-06-21 15:49:17 -04:00
parent fe9891f2f9
commit 9b23eb2d23

View file

@ -519,10 +519,7 @@ void CLI2::prepareFilter (bool applyContext)
desugarFilterPlainArgs ();
desugarFilterTags ();
findStrayModifications ();
/*
desugarFilterAttributes ();
desugarFilterAttributeModifiers ();
*/
desugarFilterPatterns ();
/*
insertJunctions (); // Deliberately after all desugar calls.
@ -923,7 +920,10 @@ void CLI2::desugarFilterAttributes ()
std::string mod = "";
std::string value = "";
if (dot != std::string::npos)
// If the dot appears after the colon, then it is part of the value, and
// should be ignored.
if (dot != std::string::npos &&
dot < colon)
{
name = raw.substr (0, dot);
mod = raw.substr (dot + 1, colon - dot - 1);