1 | import type { ParserContext } from './ParserContext';
|
2 | import type { Token } from './Token';
|
3 | import { TextRange } from './TextRange';
|
4 |
|
5 |
|
6 |
|
7 | export interface ITokenSequenceParameters {
|
8 | parserContext: ParserContext;
|
9 | startIndex: number;
|
10 | endIndex: number;
|
11 | }
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | export declare class TokenSequence {
|
17 | |
18 |
|
19 |
|
20 | readonly parserContext: ParserContext;
|
21 | private _startIndex;
|
22 | private _endIndex;
|
23 | constructor(parameters: ITokenSequenceParameters);
|
24 | /**
|
25 | * Constructs a TokenSequence object with no tokens.
|
26 | */
|
27 | static createEmpty(parserContext: ParserContext): TokenSequence;
|
28 | /**
|
29 | * The starting index into the associated `ParserContext.tokens` list.
|
30 | */
|
31 | get startIndex(): number;
|
32 | /**
|
33 | * The (non-inclusive) ending index into the associated `ParserContext.tokens` list.
|
34 | */
|
35 | get endIndex(): number;
|
36 | get tokens(): ReadonlyArray<Token>;
|
37 | /**
|
38 | * Constructs a TokenSequence that corresponds to a different range of tokens,
|
39 | * e.g. a subrange.
|
40 | */
|
41 | getNewSequence(startIndex: number, endIndex: number): TokenSequence;
|
42 | /**
|
43 | * Returns a TextRange that includes all tokens in the sequence (including any additional
|
44 | * characters between doc comment lines).
|
45 | */
|
46 | getContainingTextRange(): TextRange;
|
47 | isEmpty(): boolean;
|
48 | /**
|
49 | * Returns the concatenated text of all the tokens.
|
50 | */
|
51 | toString(): string;
|
52 | private _validateBounds;
|
53 | }
|
54 | //# sourceMappingURL=TokenSequence.d.ts.map |
\ | No newline at end of file |