summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-07-30 10:00:38 +0200
committerMax Kellermann <max@musicpd.org>2018-07-30 10:00:44 +0200
commit8707ae6fd4e0378014240f57e0810504d7243714 (patch)
tree507a0b62ab0951891af564b50d2ff78574ae9379 /src
parent8786b61636f8c09cb0172895a66dc853a26ed180 (diff)
Songfilter: allow redundant parantheses
Diffstat (limited to 'src')
-rw-r--r--src/SongFilter.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/SongFilter.cxx b/src/SongFilter.cxx
index a2a009649..d47926726 100644
--- a/src/SongFilter.cxx
+++ b/src/SongFilter.cxx
@@ -320,8 +320,15 @@ SongFilter::ParseExpression(const char *&s, bool fold_case)
s = StripLeft(s + 1);
- if (*s == '(')
+ if (*s == '(') {
+ auto first = ParseExpression(s, fold_case);
+ if (*s == ')') {
+ ++s;
+ return first;
+ }
+
throw std::runtime_error("Nested expressions not yet implemented");
+ }
auto type = ExpectFilterType(s);