Skip to content

Commit 885641b

Browse files
committed
frontend: export resumptionTargets
1 parent e4092ce commit 885641b

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/frontend.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ export const DEFAULT_MIN_TABLE_SIZE = 32;
3333
// Maximum width of entry in a table for a `TableLookup` optimization
3434
export const DEFAULT_MAX_TABLE_WIDTH = 4;
3535

36+
type WrappedNode = IWrap<frontend.node.Node>;
37+
type WrappedCode = IWrap<frontend.code.Code>;
38+
3639
export interface IFrontendLazyOptions {
3740
readonly maxTableElemWidth?: number;
3841
readonly minTableSize?: number;
@@ -43,16 +46,14 @@ export interface IFrontendResult {
4346
readonly properties: ReadonlyArray<source.Property>;
4447
readonly root: IWrap<frontend.node.Node>;
4548
readonly spans: ReadonlyArray<SpanField>;
49+
readonly resumptionTargets: ReadonlySet<WrappedNode>;
4650
}
4751

4852
interface IFrontendOptions {
4953
readonly maxTableElemWidth: number;
5054
readonly minTableSize: number;
5155
}
5256

53-
type WrappedNode = IWrap<frontend.node.Node>;
54-
type WrappedCode = IWrap<frontend.code.Code>;
55-
5657
type MatchChildren = WrappedNode[];
5758
type MatchResult = WrappedNode | ReadonlyArray<WrappedNode>;
5859

@@ -128,9 +129,16 @@ export class Frontend {
128129
this.registerNode(node);
129130
}
130131

131-
return { prefix: this.prefix, properties, spans, root: out };
132+
return {
133+
prefix: this.prefix,
134+
properties,
135+
resumptionTargets: this.resumptionTargets,
136+
root: out,
137+
spans,
138+
};
132139
}
133140

141+
// TODO(indutny): remove this in the next major release
134142
public getResumptionTargets(): ReadonlySet<WrappedNode> {
135143
return this.resumptionTargets;
136144
}

0 commit comments

Comments
 (0)