Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

helix / ExprOp

Type Alias: ExprOp โ€‹

ExprOp = "add" | "sub" | "mul" | "div" | "mod" | "min" | "max" | "abs" | "neg" | ComputeOnlyOp

Defined in: core/frontend/nodes/expr.ts:22

The score expression tree.

Portable ops (+ - * / %, negate, min, max, abs) work on every version. Compute-only ops (sqrt, trig, rounding, pow, avg, len), providers and fractional literals throw at codegen below 26.3.

Values are ints unless a float op, float provider or fractional literal makes them float. Float-ness propagates up and truncates once at the destination.

Integer div and mod floor like the scoreboard does. Built by the math tag, not by hand.

Released under the MIT License ยท Credits
These docs were written with AI; the layout and every page have been reviewed by a human.