The full formula.
The full formula.
Protected
_onProtected
Internal
Handle a base roll expression.
The first operand.
Zero or more subsequent (operators, operand) tuples.
Optional
leading: stringA leading operator.
The original matched text.
The peggy error callback to invoke on a parse error.
Protected
_onProtected
Internal
Handle a dice term.
The number of dice.
The number of die faces or a string denomination like "c" or "f".
The matched modifiers string.
Associated flavor text.
The original matched text.
Protected
_onProtected
_onProtected
_onProtected
Internal
Handle a pool term.
The first term.
Zero or more additional terms.
The matched modifiers string.
Associated flavor text.
The original matched text.
Protected
_onProtected
_onProtected
_collapseProtected
_wrapStatic
flattenStatic
toASTUse the Shunting Yard algorithm to convert a parse tree or list of terms into an AST with correct operator precedence. See https://en.wikipedia.org/wiki/Shunting_yard_algorithm for a description of the algorithm in detail.
The root of the parse tree or a list of terms.
The root of the AST.
Static
isStatic
formatStatic
formatStatic
format
A class for transforming events from the Peggy grammar lexer into various formats.