MCPcopy Index your code
hub / github.com/autoNumeric/autoNumeric / constructor

Method constructor

src/maths/Parser.js:58–65  ·  view source on GitHub ↗

* 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 = '.')

Source from the content-addressed store, hash-verified

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();

Callers

nothing calls this directly

Calls 2

_expMethod · 0.95
getNextTokenMethod · 0.80

Tested by

no test coverage detected