MCPcopy
hub / github.com/josdejong/mathjs / parseString

Function parseString

src/expression/parse.js:1526–1542  ·  view source on GitHub ↗

* Parse a single or double quoted string. * @return {Node} node * @private

(state)

Source from the content-addressed store, hash-verified

1524 * @private
1525 */
1526 function parseString (state) {
1527 let node, str
1528
1529 if (state.token === '"' || state.token === "'") {
1530 str = parseStringToken(state, state.token)
1531
1532 // create constant
1533 node = new ConstantNode(str)
1534
1535 // parse index parameters
1536 node = parseAccessors(state, node)
1537
1538 return node
1539 }
1540
1541 return parseMatrix(state)
1542 }
1543
1544 /**
1545 * Parse a string surrounded by single or double quotes

Callers 1

parseSymbolFunction · 0.85

Calls 3

parseStringTokenFunction · 0.85
parseAccessorsFunction · 0.85
parseMatrixFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…