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

Function Parser

static/katex/katex.js:15253–15268  ·  view source on GitHub ↗
(input, settings)

Source from the content-addressed store, hash-verified

15251/*#__PURE__*/
15252function () {
15253 function Parser(input, settings) {
15254 this.mode = void 0;
15255 this.gullet = void 0;
15256 this.settings = void 0;
15257 this.leftrightDepth = void 0;
15258 this.nextToken = void 0;
15259 // Start in math mode
15260 this.mode = "math"; // Create a new macro expander (gullet) and (indirectly via that) also a
15261 // new lexer (mouth) for this parser (stomach, in the language of TeX)
15262
15263 this.gullet = new MacroExpander_MacroExpander(input, settings, this.mode); // Store the settings for use in parsing
15264
15265 this.settings = settings; // Count leftright depth (for \middle errors)
15266
15267 this.leftrightDepth = 0;
15268 }
15269 /**
15270 * Checks a result to make sure it has the right type, and throws an
15271 * appropriate error otherwise.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected