aboutsummaryrefslogtreecommitdiff
path: root/src/fexpr/grammar.lalrpop
diff options
context:
space:
mode:
authorDaniel <kingdread@gmx.de>2020-04-20 13:47:00 +0200
committerDaniel <kingdread@gmx.de>2020-04-20 13:47:00 +0200
commit569c17607297dbbd57462a9603861d9fe619fd2d (patch)
tree51860940da08290f261d67670162c8fc1fb861d3 /src/fexpr/grammar.lalrpop
parente19519e155af95698807f377a5f6b525e255c4e5 (diff)
downloadraidgrep-569c17607297dbbd57462a9603861d9fe619fd2d.tar.gz
raidgrep-569c17607297dbbd57462a9603861d9fe619fd2d.tar.bz2
raidgrep-569c17607297dbbd57462a9603861d9fe619fd2d.zip
Add -player as a shortcut to search player names
Diffstat (limited to 'src/fexpr/grammar.lalrpop')
-rw-r--r--src/fexpr/grammar.lalrpop5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fexpr/grammar.lalrpop b/src/fexpr/grammar.lalrpop
index cb16153..48349a1 100644
--- a/src/fexpr/grammar.lalrpop
+++ b/src/fexpr/grammar.lalrpop
@@ -53,6 +53,11 @@ LogPredicate: Box<dyn filters::log::LogFilter> = {
"-boss" <Comma<Boss>> => filters::log::BossFilter::new(<>),
+ "-player" <Regex> => filters::player::any(
+ filters::player::NameFilter::new(SearchField::Character, <>.clone())
+ | filters::player::NameFilter::new(SearchField::Account, <>)
+ ),
+
"all" "(" "player" ":" <PlayerFilter> ")" => filters::player::all(<>),
"any" "(" "player" ":" <PlayerFilter> ")" => filters::player::any(<>),
"exists" "(" "player" ":" <PlayerFilter> ")" => filters::player::any(<>),