Skip to main content

Module element_count

Module element_count 

Source
Expand description

Canonical Workshop element-count analysis.

The calculator operates on validated WIR, not source-language syntax or emitted text. Its rules are the documented Workshop.codes model: rules, actions, conditions, and ordinary values cost one element; arrays and evaluate-once values cost two; localized strings cost two; direct action or condition arguments are reduced by one; and every pair of hero literals in those arguments adds one. Custom game settings and rule parameters cost zero.

Structs§

ElementCountNode
One node’s contribution, including its nested WIR provenance.
ElementCountReport
A structured element-count report for one canonical Workshop program.

Enums§

ElementCountError
A construct for which an exact canonical element count cannot be produced.
ElementNodeKind
The WIR node category represented in an element-count report.