BindingPower
const BindingPower: { Assignment: 10; BitwiseAnd: 22; BitwiseOr: 18; BitwiseXor: 20; Call: 80; Conditional: 24; Conjunction: 16; Exponent: 50; LogicalAnd: 14; LogicalOr: 12; Lowest: 0; Postfix: 70; Prefix: 60; Product: 40; Shift: 27; Sum: 30;};Defined in: packages/engine/src/parser/BindingPower.ts:12
Named precedence levels for the Pratt parser, from loosest (Lowest) to
tightest (Call) binding. A custom infix parselet compares its own
binding power against the current expression’s to decide whether to
consume the next operator (higher power binds tighter, e.g. * over +).
Package authors reference these when registering an infix parselet via
IPackageRegistry.registerInfixParselet. See the built-in packages for
examples of picking an appropriate level (e.g. arithmetic +/- use
Sum, *// use Product).
Type Declaration
Section titled “Type Declaration”Assignment
Section titled “Assignment”readonly Assignment: 10 = 10;BitwiseAnd
Section titled “BitwiseAnd”readonly BitwiseAnd: 22 = 22;BitwiseOr
Section titled “BitwiseOr”readonly BitwiseOr: 18 = 18;BitwiseXor
Section titled “BitwiseXor”readonly BitwiseXor: 20 = 20;readonly Call: 80 = 80;Conditional
Section titled “Conditional”readonly Conditional: 24 = 24;Conjunction
Section titled “Conjunction”readonly Conjunction: 16 = 16;Exponent
Section titled “Exponent”readonly Exponent: 50 = 50;LogicalAnd
Section titled “LogicalAnd”readonly LogicalAnd: 14 = 14;LogicalOr
Section titled “LogicalOr”readonly LogicalOr: 12 = 12;Lowest
Section titled “Lowest”readonly Lowest: 0 = 0;Postfix
Section titled “Postfix”readonly Postfix: 70 = 70;Prefix
Section titled “Prefix”readonly Prefix: 60 = 60;Product
Section titled “Product”readonly Product: 40 = 40;readonly Shift: 27 = 27;readonly Sum: 30 = 30;