diff --git a/dicebot/src/basic/parser.rs b/dicebot/src/basic/parser.rs index 9c5b83f..80f7f04 100644 --- a/dicebot/src/basic/parser.rs +++ b/dicebot/src/basic/parser.rs @@ -84,12 +84,12 @@ fn parse_keep_or_drop<'a>(input: &'a str, count: u32) -> IResult<&'a str, KeepOr use ParsedKeepOrDrop::*; let keep_drop: KeepOrDrop = match (keep, drop) { - //Valid Keep expression. + //Potential valid Keep expression. (Keep(keep), NotPresent) => match keep.parse().map_err(|_| too_big!(input))? { _i if _i > count || _i == 0 => Ok(KeepOrDrop::None), i => Ok(KeepOrDrop::Keep(i)), }, - //Valid Drop expression. + //Potential valid Drop expression. (NotPresent, Drop(drop)) => match drop.parse().map_err(|_| too_big!(input))? { _i if _i >= count => Ok(KeepOrDrop::None), i => Ok(KeepOrDrop::Drop(i)),