CLI
- Quoted some of the literals from desugaring attribute modifiers.
This commit is contained in:
13
src/CLI.cpp
13
src/CLI.cpp
@@ -647,9 +647,8 @@ void CLI::addArg (const std::string& arg)
|
|||||||
_original_args.push_back (raw);
|
_original_args.push_back (raw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The argument may require lexing. Lex anyway, and analyze before comitting
|
||||||
// How often have I said to you that when you have eliminated the impossible,
|
// that.
|
||||||
// whatever remains, however improbable, must be the truth?
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Lex each remaining argument. The apply a series of disqualifying tests
|
// Lex each remaining argument. The apply a series of disqualifying tests
|
||||||
@@ -674,6 +673,8 @@ void CLI::addArg (const std::string& arg)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// How often have I said to you that when you have eliminated the
|
||||||
|
// impossible, whatever remains, however improbable, must be the truth?
|
||||||
std::vector <std::pair <std::string, Lexer::Type> >::iterator l;
|
std::vector <std::pair <std::string, Lexer::Type> >::iterator l;
|
||||||
for (l = lexemes.begin (); l != lexemes.end (); ++l)
|
for (l = lexemes.begin (); l != lexemes.end (); ++l)
|
||||||
_original_args.push_back (l->first);
|
_original_args.push_back (l->first);
|
||||||
@@ -917,7 +918,7 @@ void CLI::desugarFilterTags ()
|
|||||||
op.tag ("FILTER");
|
op.tag ("FILTER");
|
||||||
reconstructed.push_back (op);
|
reconstructed.push_back (op);
|
||||||
|
|
||||||
A right ("argTag", tag);
|
A right ("argTag", "'" + tag + "'");
|
||||||
right.tag ("LITERAL");
|
right.tag ("LITERAL");
|
||||||
right.tag ("FILTER");
|
right.tag ("FILTER");
|
||||||
reconstructed.push_back (right);
|
reconstructed.push_back (right);
|
||||||
@@ -1160,13 +1161,13 @@ void CLI::desugarFilterAttributeModifiers ()
|
|||||||
else if (modifier == "is" || modifier == "equals")
|
else if (modifier == "is" || modifier == "equals")
|
||||||
{
|
{
|
||||||
op.attribute ("raw", "==");
|
op.attribute ("raw", "==");
|
||||||
rhs.attribute ("raw", value);
|
rhs.attribute ("raw", "'" + value + "'");
|
||||||
rhs.tag ("LITERAL");
|
rhs.tag ("LITERAL");
|
||||||
}
|
}
|
||||||
else if (modifier == "isnt" || modifier == "not")
|
else if (modifier == "isnt" || modifier == "not")
|
||||||
{
|
{
|
||||||
op.attribute ("raw", "!=");
|
op.attribute ("raw", "!=");
|
||||||
rhs.attribute ("raw", value);
|
rhs.attribute ("raw", "'" + value + "'");
|
||||||
rhs.tag ("LITERAL");
|
rhs.tag ("LITERAL");
|
||||||
}
|
}
|
||||||
else if (modifier == "has" || modifier == "contains")
|
else if (modifier == "has" || modifier == "contains")
|
||||||
|
|||||||
Reference in New Issue
Block a user