use accept to add a child
@override void accept(SpanNode? node) { super.accept(node); if (node != null && node is ListNode) { node._index = start; start++; } }