MCPcopy Create free account
hub / github.com/TruthHun/BookStack / constructor

Method constructor

static/katex/katex.mjs:14897–14912  ·  view source on GitHub ↗
(input, settings)

Source from the content-addressed store, hash-verified

14895 */
14896class Parser {
14897 constructor(input, settings) {
14898 this.mode = void 0;
14899 this.gullet = void 0;
14900 this.settings = void 0;
14901 this.leftrightDepth = void 0;
14902 this.nextToken = void 0;
14903 // Start in math mode
14904 this.mode = "math"; // Create a new macro expander (gullet) and (indirectly via that) also a
14905 // new lexer (mouth) for this parser (stomach, in the language of TeX)
14906
14907 this.gullet = new MacroExpander(input, settings, this.mode); // Store the settings for use in parsing
14908
14909 this.settings = settings; // Count leftright depth (for \middle errors)
14910
14911 this.leftrightDepth = 0;
14912 }
14913 /**
14914 * Checks a result to make sure it has the right type, and throws an
14915 * appropriate error otherwise.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected