diff options
author | Daniel Schadt <kingdread@gmx.de> | 2021-11-17 21:24:35 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2021-11-17 21:24:35 +0100 |
commit | dcc7cb9ccb7a8d133c96e939fce500eb97c866e6 (patch) | |
tree | 3eef3c652aa6beaacfbf8a58e4ad9359adeb2e73 /src/fexpr/grammar.lalrpop | |
parent | 5d18c3e79638573fb7ccf03349b7a5ca0c9d97f9 (diff) | |
download | raidgrep-dcc7cb9ccb7a8d133c96e939fce500eb97c866e6.tar.gz raidgrep-dcc7cb9ccb7a8d133c96e939fce500eb97c866e6.tar.bz2 raidgrep-dcc7cb9ccb7a8d133c96e939fce500eb97c866e6.zip |
Implement -gamemode
-gamemode is a more general version of -raid/-fractal/...
Diffstat (limited to 'src/fexpr/grammar.lalrpop')
-rw-r--r-- | src/fexpr/grammar.lalrpop | 10 |
1 files changed, 10 insertions, 0 deletions
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<dyn filters::log::LogFilter> = { "-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), @@ -155,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 { |