Fork me on GitHub

core/parser

Classes

Parser

Methods

parseTokens(tokens: object[], parseMode?: string, args?: string[], macro?: object, smartFence?: boolean): object[]private

Given an array of tokens returned by the lexer, return a corresponding math list (array of atoms).

tokens : object[]
parseMode : string = 'math'
args : string[] = {}

If there are any placeholder tokens, e.g. #0, #1, etc... they will be replaced by the value provided by args.

macro : object = {}

Dictionary defining macros

smartFence : boolean = false

If true, promote plain fences, e.g. (, as \left...\right or \mleft...\mright

: object[]   

An array of MathAtom