Skip to content

@dice-roller/rpg-dice-roller / ast / binary

Function: binary() ​

binary(op, left, right): BinaryNode

Defined in: src/ast/builders.ts:150

A binary operation, e.g. binary("+", pool(2, 6), 3) for 2d6+3.

Parameters ​

op ​

"+" | "-" | "*" | "/" | "%" | "^"

left ​

ExpressionInput

ExpressionInput

Returns ​

BinaryNode

MIT Licensed · Credits