aboutsummaryrefslogtreecommitdiff
path: root/src/fexpr/grammar.lalrpop
diff options
context:
space:
mode:
authorDaniel <kingdread@gmx.de>2021-11-19 22:04:50 +0100
committerDaniel <kingdread@gmx.de>2021-11-19 22:04:50 +0100
commit53123d5ab01f2b6ee0282ff067ba39e10b28528e (patch)
tree11c616ea7a20be3f7e9f8688c2d5d3134359731d /src/fexpr/grammar.lalrpop
parent0c634d3c2d279ef75347ac635b69d396d5bf695a (diff)
parenta7682465132e4758bd50777f17a7c4b2048b4c8c (diff)
downloadraidgrep-53123d5ab01f2b6ee0282ff067ba39e10b28528e.tar.gz
raidgrep-53123d5ab01f2b6ee0282ff067ba39e10b28528e.tar.bz2
raidgrep-53123d5ab01f2b6ee0282ff067ba39e10b28528e.zip
Merge branch 'gamemode-filters'
Diffstat (limited to 'src/fexpr/grammar.lalrpop')
-rw-r--r--src/fexpr/grammar.lalrpop17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/fexpr/grammar.lalrpop b/src/fexpr/grammar.lalrpop
index ce78396..bca7691 100644
--- a/src/fexpr/grammar.lalrpop
+++ b/src/fexpr/grammar.lalrpop
@@ -9,7 +9,7 @@ use super::{
DurationProducer,
CountProducer,
};
-use evtclib::Encounter;
+use evtclib::{Encounter, GameMode};
use std::collections::HashSet;
use lalrpop_util::ParseError;
@@ -64,6 +64,12 @@ LogPredicate: Box<dyn filters::log::LogFilter> = {
"-boss" <Comma<Encounter>> => filters::log::encounter(<>),
"-cm" => filters::log::challenge_mote(),
+ "-raid" => filters::log::game_mode([GameMode::Raid].into()),
+ "-fractal" => filters::log::game_mode([GameMode::Fractal].into()),
+ "-strike" => filters::log::game_mode([GameMode::Strike].into()),
+ "-wvw" => filters::log::game_mode([GameMode::WvW].into()),
+ "-gamemode" <Comma<GameMode>> => filters::log::game_mode(<>),
+
"-include" => filters::constant(true),
"-exclude" => filters::constant(false),
@@ -150,6 +156,15 @@ Encounter: Encounter = {
}),
}
+GameMode: GameMode = {
+ <l:@L> <w:word> =>? w.parse().map_err(|_| ParseError::User {
+ error: FError {
+ location: l,
+ kind: FErrorKind::GameMode,
+ }
+ }),
+}
+
PlayerClass: PlayerClass = {
<l:@L> <w:word> =>? w.parse().map_err(|_| ParseError::User {
error: FError {