(input, settings)
| 14895 | */ |
| 14896 | class 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. |
nothing calls this directly
no outgoing calls
no test coverage detected