when a SpanNope is visited, this callback will be triggered
SpanNope
typedef SpanNodeAcceptCallback = void Function(SpanNode node, int nodeIndex);