From dcc7cb9ccb7a8d133c96e939fce500eb97c866e6 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 17 Nov 2021 21:24:35 +0100 Subject: Implement -gamemode -gamemode is a more general version of -raid/-fractal/... --- src/fexpr/grammar.lalrpop | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/fexpr/grammar.lalrpop') diff --git a/src/fexpr/grammar.lalrpop b/src/fexpr/grammar.lalrpop index 580fa1b..bca7691 100644 --- a/src/fexpr/grammar.lalrpop +++ b/src/fexpr/grammar.lalrpop @@ -68,6 +68,7 @@ LogPredicate: Box = { "-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" > => filters::log::game_mode(<>), "-include" => filters::constant(true), "-exclude" => filters::constant(false), @@ -155,6 +156,15 @@ Encounter: Encounter = { }), } +GameMode: GameMode = { + =>? w.parse().map_err(|_| ParseError::User { + error: FError { + location: l, + kind: FErrorKind::GameMode, + } + }), +} + PlayerClass: PlayerClass = { =>? w.parse().map_err(|_| ParseError::User { error: FError { -- cgit v1.2.3