Sw1ft0 / SWADE-Dice-Roller-Discord-Bot

1 stars 0 forks source link

Allow parser.StateMachine to build Abstract Syntax Tree of operations #7

Open DzyubSpirit opened 2 months ago

DzyubSpirit commented 2 months ago

The list should start empty and update after calls to StateMachine.move_one_step() as more tokens are consumed and the state changes from node to node.

The final list should be something like:

For 3d4:
d
|- 4
3 

For 4d2+2dice3:
+
|----- d
d      |- 3
|- 2   2
4