CLI2: ::desugarFilterAttributes now relies on earlier parsing
This commit is contained in:
16
src/CLI2.cpp
16
src/CLI2.cpp
@@ -1061,12 +1061,11 @@ void CLI2::desugarFilterAttributes ()
|
|||||||
a.hasTag ("FILTER"))
|
a.hasTag ("FILTER"))
|
||||||
{
|
{
|
||||||
std::string raw = a.attribute ("raw");
|
std::string raw = a.attribute ("raw");
|
||||||
std::string name;
|
std::string name = a.attribute ("name");
|
||||||
std::string mod;
|
std::string mod = a.attribute ("modifier");
|
||||||
std::string sep;
|
std::string sep = a.attribute ("separator");
|
||||||
std::string value;
|
std::string value = a.attribute ("value");
|
||||||
if (Lexer::decomposePair (raw, name, mod, sep, value))
|
|
||||||
{
|
|
||||||
if (value == "")
|
if (value == "")
|
||||||
value = "''";
|
value = "''";
|
||||||
|
|
||||||
@@ -1183,6 +1182,7 @@ void CLI2::desugarFilterAttributes ()
|
|||||||
reconstructed.push_back (rhs);
|
reconstructed.push_back (rhs);
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the name does not canonicalize to either an attribute or a UDA
|
// If the name does not canonicalize to either an attribute or a UDA
|
||||||
// then it is not a recognized Lexer::Type::pair, so downgrade it to
|
// then it is not a recognized Lexer::Type::pair, so downgrade it to
|
||||||
// Lexer::Type::word.
|
// Lexer::Type::word.
|
||||||
@@ -1196,10 +1196,6 @@ void CLI2::desugarFilterAttributes ()
|
|||||||
else
|
else
|
||||||
reconstructed.push_back (a);
|
reconstructed.push_back (a);
|
||||||
}
|
}
|
||||||
// Failed to decompose.
|
|
||||||
else
|
|
||||||
reconstructed.push_back (a);
|
|
||||||
}
|
|
||||||
// Not a FILTER pair.
|
// Not a FILTER pair.
|
||||||
else
|
else
|
||||||
reconstructed.push_back (a);
|
reconstructed.push_back (a);
|
||||||
|
|||||||
Reference in New Issue
Block a user