UNPKG

955 BTypeScriptView Raw
1import { TokenPattern, CharacterStreamInterface } from './types';
2export default class CharacterStream implements CharacterStreamInterface {
3 private _start;
4 private _pos;
5 private _sourceText;
6 constructor(sourceText: string);
7 getStartOfToken: () => number;
8 getCurrentPosition: () => number;
9 private _testNextCharacter;
10 eol: () => boolean;
11 sol: () => boolean;
12 peek: () => string | null;
13 next: () => string;
14 eat: (pattern: TokenPattern) => string | undefined;
15 eatWhile: (match: TokenPattern) => boolean;
16 eatSpace: () => boolean;
17 skipToEnd: () => void;
18 skipTo: (position: number) => void;
19 match: (pattern: TokenPattern, consume?: boolean | null | undefined, caseFold?: boolean | null | undefined) => Array<string> | boolean;
20 backUp: (num: number) => void;
21 column: () => number;
22 indentation: () => number;
23 current: () => string;
24}
25//# sourceMappingURL=CharacterStream.d.ts.map
\No newline at end of file