nodeCount property

int get nodeCount

Count of all nodes in this subtree (self + descendants).

Used by the schema validator to enforce the node-count cap (FR-002).

Implementation

int get nodeCount => 1 + children.fold<int>(0, (sum, c) => sum + c.nodeCount);