forked from projectmoon/tenebrous-dicebot
ee3ec18e06
This commit refactors the keep-drop parsing into two separate functions: one for extracting keep-drop text, and one for actually doing something with the extracted values. An intermediate enum is introduced to contain extracted text, instead of relying on Ok/Err values directly for figuring out what to do with the values. This allows us to express "this behavior is correct, and all others are not" instead of using a "fall back to secondary functionality" approach. Reviewed-on: projectmoon/tenebrous-dicebot#93 Co-Authored-By: projectmoon <projectmoon@noreply.git.agnos.is> Co-Committed-By: projectmoon <projectmoon@noreply.git.agnos.is> |
||
---|---|---|
.. | ||
dice.rs | ||
mod.rs | ||
parser.rs | ||
roll.rs |