Expressions
- Command line arguments are now handled a little differently. Each argument is subjected to further splitting, to break up expressions early in the process, prior to categorization. - Patterns are now treated as quoted string, where the quote character is /.
This commit is contained in:
@@ -45,26 +45,26 @@ Expression::Expression (Arguments& arguments)
|
||||
{
|
||||
_args.dump ("Expression::Expression");
|
||||
|
||||
if (is_new_style () && context.config.getBoolean ("expressions"))
|
||||
{
|
||||
bool new_style = is_new_style () && context.config.getBoolean ("expressions");
|
||||
if (new_style)
|
||||
context.debug ("Filter --> new");
|
||||
expand_sequence ();
|
||||
expand_tokens ();
|
||||
postfix ();
|
||||
}
|
||||
else
|
||||
{
|
||||
context.debug ("Filter --> old");
|
||||
expand_sequence ();
|
||||
|
||||
expand_sequence ();
|
||||
|
||||
if (new_style)
|
||||
{
|
||||
implicit_and ();
|
||||
expand_tag ();
|
||||
expand_pattern ();
|
||||
expand_attr ();
|
||||
expand_attmod ();
|
||||
expand_word ();
|
||||
expand_tokens ();
|
||||
postfix ();
|
||||
}
|
||||
|
||||
expand_tokens ();
|
||||
postfix ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -226,6 +226,9 @@ void Expression::expand_tokens ()
|
||||
n.getQuoted ('\'', s, true))
|
||||
temp.push_back (std::make_pair (s, "string"));
|
||||
|
||||
else if (n.getQuoted ('/', s, true))
|
||||
temp.push_back (std::make_pair (s, "pattern"));
|
||||
|
||||
else if (n.getOneOf (operators, s))
|
||||
temp.push_back (std::make_pair (s, "op"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user