UNPKG

@tsukiroku/tiny

Version:
29 lines (28 loc) 838 B
import * as Tiny from '../../index'; export default class Lexer { input: string; options: Tiny.LexerOptions; filename: string; position: number; readPosition: number; ch: string; column: number; line: number; lineStart: number; messages: Tiny.Errors; constructor(input: string, options: Tiny.LexerOptions, filename: string); curr(): Tiny.Position; readChar(): void; readIdentifier(): Tiny.Token; readNumber(): Tiny.Token; private replaceAll; readString(tok: Tiny.TokenType): Tiny.Token; skipWhitespace(): void; peekChar(): string; readComment(): Tiny.Token; checkToken(token: string, next?: string | null): boolean; check(tests: Array<Readonly<Tiny.TokenCheck>>): Tiny.Token; nextToken(): Tiny.Token; private isLetter; private isDigit; }