- ::findAttributeModifier now tolerates missing values and generates the
  correct expression term.
This commit is contained in:
Paul Beckingham 2014-05-31 22:26:44 -04:00
parent fc5dad7a9a
commit 5df49ec5e3

View file

@ -814,6 +814,9 @@ void Parser::findAttribute ()
n.getUntilEOS (value) ||
n.depleted ())
{
if (value == "")
value = "''";
std::string canonical;
if (canonicalize (canonical, "uda", name))
{
@ -858,10 +861,7 @@ void Parser::findAttribute ()
branch->attribute ("raw", "==");
branch = (*i)->addBranch (new Tree ("argAtt"));
if (value != "")
branch->attribute ("raw", value);
else
branch->attribute ("raw", "'" + value + "'");
branch->attribute ("raw", value);
}
}
}
@ -909,8 +909,12 @@ void Parser::findAttributeModifier ()
std::string value;
if (n.getQuoted ('"', value) ||
n.getQuoted ('\'', value) ||
n.getUntilEOS (value))
n.getUntilEOS (value) ||
n.depleted ())
{
if (value == "")
value = "''";
(*i)->unTag ("?");
(*i)->tag ("ATTMOD");
(*i)->attribute ("name", canonical);