summaryrefslogtreecommitdiffstats
path: root/llparse-builder/src/node/span-end.ts
blob: 377cd73f236c022b94c2d6105c9adc467e006864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { Span } from '../span';
import { Node } from './base';

/**
 * Indicates span end.
 *
 * A callback will be invoked with all input data since the most recent of:
 *
 * * Span start invocation
 * * Parser execution
 */
export class SpanEnd extends Node {
  /**
   * @param span  Span instance
   */
  constructor(public readonly span: Span) {
    super(`span_end_${span.callback.name}`);
  }
}