mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Search parsing: fix using a parenthesized expression following an implied "and".
This commit is contained in:
parent
2723d9f2cf
commit
c6a6fe07cf
@ -221,8 +221,8 @@ class Parser(object):
|
|||||||
return ['and', lhs, self.and_expression()]
|
return ['and', lhs, self.and_expression()]
|
||||||
|
|
||||||
# Account for the optional 'and'
|
# Account for the optional 'and'
|
||||||
if (self.token_type() in [self.WORD, self.QUOTED_WORD] and
|
if ((self.token_type() in [self.WORD, self.QUOTED_WORD] or self.token() == '(')
|
||||||
self.lcase_token() != 'or'):
|
and self.lcase_token() != 'or'):
|
||||||
return ['and', lhs, self.and_expression()]
|
return ['and', lhs, self.and_expression()]
|
||||||
return lhs
|
return lhs
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user