Parser
Parser
The Parser takes a notation string and parses it into objects.
It is used internally by the DiceRoll object when rolling notation, but can be used by itself if necessary.
Kind: global class
See
- https://dice-roller.github.io/documentation/guide/notation/
- https://en.m.wikipedia.org/wiki/Dice_notation
Parser.parse(notation) ⇒ Array
Parses the given dice notation and returns a list of dice and modifiers found
Kind: static method of Parser
Throws:
RequiredArgumentErrorNotation is requiredSyntaxErrorThe notation syntax is invalidTypeErrorNotation must be a string
| Param | Type | Description |
|---|---|---|
| notation | string | The notation to parse |