ProjectMoon / matrix-dicebot

This repository is mirrored from: https://git.agnos.is/projectmoon/matrix-dicebot
https://git.agnos.is/projectmoon/matrix-dicebot
Other
4 stars 1 forks source link

Parser Rewrite #12

Closed ProjectMoon closed 4 years ago

ProjectMoon commented 4 years ago

Rewrite of the CofD dice pool parser and core command parsing to use combine instead of nom. The dice pool parser has been rewritten in preparation for use of variables and more complicated expressions to allow bonuses/penalties. The command parser was rewritten to use combine simply because I find it less confusing than nom. The only thing that uses nom is the original dice rolling code. The legacy code boundary is contained in the parse_roll function in src/commands/parser.rs.