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

Parser.parse(notation) ⇒ Array

Parses the given dice notation and returns a list of dice and modifiers found

Kind: static method of Parser
Throws:

  • RequiredArgumentError Notation is required
  • SyntaxError The notation syntax is invalid
  • TypeError Notation must be a string
ParamTypeDescription
notationstringThe notation to parse