1 | import { Token } from "./index";
|
2 | import { ContextualKeyword } from "./keywords";
|
3 | import { TokenType } from "./types";
|
4 | export declare class Scope {
|
5 | startTokenIndex: number;
|
6 | endTokenIndex: number;
|
7 | isFunctionScope: boolean;
|
8 | constructor(startTokenIndex: number, endTokenIndex: number, isFunctionScope: boolean);
|
9 | }
|
10 | export declare class StateSnapshot {
|
11 | readonly potentialArrowAt: number;
|
12 | readonly noAnonFunctionType: boolean;
|
13 | readonly tokensLength: number;
|
14 | readonly scopesLength: number;
|
15 | readonly pos: number;
|
16 | readonly type: TokenType;
|
17 | readonly contextualKeyword: ContextualKeyword;
|
18 | readonly start: number;
|
19 | readonly end: number;
|
20 | readonly isType: boolean;
|
21 | readonly scopeDepth: number;
|
22 | readonly error: Error | null;
|
23 | constructor(potentialArrowAt: number, noAnonFunctionType: boolean, tokensLength: number, scopesLength: number, pos: number, type: TokenType, contextualKeyword: ContextualKeyword, start: number, end: number, isType: boolean, scopeDepth: number, error: Error | null);
|
24 | }
|
25 | export default class State {
|
26 | potentialArrowAt: number;
|
27 | noAnonFunctionType: boolean;
|
28 | tokens: Array<Token>;
|
29 | scopes: Array<Scope>;
|
30 | pos: number;
|
31 | type: TokenType;
|
32 | contextualKeyword: ContextualKeyword;
|
33 | start: number;
|
34 | end: number;
|
35 | isType: boolean;
|
36 | scopeDepth: number;
|
37 | |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | error: Error | null;
|
46 | snapshot(): StateSnapshot;
|
47 | restoreFromSnapshot(snapshot: StateSnapshot): void;
|
48 | }
|