* Parse the given string, and generate an abstract syntax tree (AST) from the math expression * * @param {string} text * @param {string} customDecimalCharacter The custom decimal character to use in floats * @returns {ASTNode}
(text, customDecimalCharacter = '.')
| 56 | * @returns {ASTNode} |
| 57 | */ |
| 58 | constructor(text, customDecimalCharacter = '.') { |
| 59 | this.text = text; |
| 60 | this.decimalCharacter = customDecimalCharacter; |
| 61 | this.lexer = new Lexer(text); |
| 62 | this.token = this.lexer.getNextToken(this.decimalCharacter); |
| 63 | |
| 64 | return this._exp(); |
| 65 | } |
| 66 | |
| 67 | _exp() { |
| 68 | const termNode = this._term(); |
nothing calls this directly
no test coverage detected