UNPKG

formkl

Version:
32 lines (31 loc) 668 B
import { Token } from "./types"; /** * Tokenizer class * Lazily pulls a token from a stream. */ export declare class Tokenizer { syntax: string; cursor: number; currentLine: number; currentColumn: number; /** * Initializes the string. */ constructor(string: string); /** * Whether the tokenizer reached EOF. */ isEOF(): boolean; /** * Whether we still have more tokens. */ hasMoreTokens(): boolean; /** * Obtains next token. */ getNextToken(): Token | null; /** * Matches a token for a regular expression. */ _match(regexp: RegExp, string: string): string; }