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"))
|
||||
{
|
||||
std::string raw = a.attribute ("raw");
|
||||
std::string name;
|
||||
std::string mod;
|
||||
std::string sep;
|
||||
std::string value;
|
||||
if (Lexer::decomposePair (raw, name, mod, sep, value))
|
||||
{
|
||||
std::string name = a.attribute ("name");
|
||||
std::string mod = a.attribute ("modifier");
|
||||
std::string sep = a.attribute ("separator");
|
||||
std::string value = a.attribute ("value");
|
||||
|
||||
if (value == "")
|
||||
value = "''";
|
||||
|
||||
@@ -1183,6 +1182,7 @@ void CLI2::desugarFilterAttributes ()
|
||||
reconstructed.push_back (rhs);
|
||||
found = true;
|
||||
}
|
||||
|
||||
// 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
|
||||
// Lexer::Type::word.
|
||||
@@ -1196,10 +1196,6 @@ void CLI2::desugarFilterAttributes ()
|
||||
else
|
||||
reconstructed.push_back (a);
|
||||
}
|
||||
// Failed to decompose.
|
||||
else
|
||||
reconstructed.push_back (a);
|
||||
}
|
||||
// Not a FILTER pair.
|
||||
else
|
||||
reconstructed.push_back (a);
|
||||
|
||||
Reference in New Issue
Block a user