new Lexer(s: string)private
Given a LaTeX expression represented as a character string, the Lexer class will scan and return Tokens for the lexical units in the string.
s
:
string
A string of LaTeX
Methods
end(): booleanprivate
→ : booleanTrue if we reached the end of the stream
get(): string
Return the next char and advance
makeToken(): Tokenprivate
Return a single token, or null, created from the lexer.
peek(): stringprivate
Return the next char, but do not advance
scan(regEx: RegEx): nullable stringprivate
Return the next substring matching regEx and advance.
regEx
:
RegEx