@dice-roller/rpg-dice-roller / ast / nodeToNotation
Function: nodeToNotation() ​
nodeToNotation(
node):string
Defined in: src/ast/notation.ts:35
Converts an expression to canonical notation, e.g. a pool to 4d6kh3.
Parentheses may be added to preserve precedence. Parsed notation round-trips through the parser, but arbitrary builder nodes need not: custom factories, unsupported range / face arguments, and face lists above the notation limit use display-only name(args) forms. Ambiguous != comparisons may be written as <>.
Parameters ​
node ​
Returns ​
string