UNPKG

ebnf-railroad-visualizer

Version:
35 lines (34 loc) 994 B
import { Token } from './Token.js'; export declare class Scanner { private readonly input; private pos; private ch; private isLiteral; private line; private column; constructor(input: string); next(): Token; /** * Get the next character from the input and skip LF symbol */ private nextChar; /** * Check if there are more characters to read * @returns true if there are more characters to read, otherwise false */ hasNext(): boolean; private isWhitespace; /** * Returns the position of the scanner. * @returns the line and column of the scanner */ getPosition(): [number, number]; /** * Checks if char is some type of quote character. * * Because iOS (and probably other OS) uses different quotes. * @param char The character to check. * @returns `true` if the character is a quote character, `false` otherwise. */ static isQuote(char: string): boolean; }