summaryrefslogtreecommitdiffstats
path: root/llparse-builder/src/node/span-end.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--llparse-builder/src/node/span-end.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/llparse-builder/src/node/span-end.ts b/llparse-builder/src/node/span-end.ts
new file mode 100644
index 0000000..377cd73
--- /dev/null
+++ b/llparse-builder/src/node/span-end.ts
@@ -0,0 +1,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}`);
+ }
+}