count and sides are full sub-expressions, not numbers, which is what
makes computed dice like (1+1)d(3*2) and (1d4)d6 expressible. Both are
evaluated first and must resolve to integers; d% desugars to a sides
literal of 100, and an omitted count to a count literal of 1.
Dice rolled by the count/sides sub-expressions are meta-expression dice
— they land in RollResult.rolls tagged 'meta' and belong to no pool.
Dice roll node (
NdX,dX,d%).countandsidesare full sub-expressions, not numbers, which is what makes computed dice like(1+1)d(3*2)and(1d4)d6expressible. Both are evaluated first and must resolve to integers;d%desugars to asidesliteral of100, and an omitted count to acountliteral of1.Dice rolled by the
count/sidessub-expressions are meta-expression dice — they land inRollResult.rollstagged'meta'and belong to no pool.