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

Function parseLeftHandOperators

src/expression/parse.js:1285–1307  ·  view source on GitHub ↗

* Left hand operators: factorial x!, ctranspose x' * @return {Node} node * @private

(state)

Source from the content-addressed store, hash-verified

1283 * @private
1284 */
1285 function parseLeftHandOperators (state) {
1286 let node, name, fn, params
1287
1288 node = parseCustomNodes(state)
1289
1290 const operators = {
1291 '!': 'factorial',
1292 '\'': 'ctranspose'
1293 }
1294
1295 while (hasOwnProperty(operators, state.token)) {
1296 name = state.token
1297 fn = operators[name]
1298
1299 getToken(state)
1300 params = [node]
1301
1302 node = new OperatorNode(name, fn, params)
1303 node = parseAccessors(state, node)
1304 }
1305
1306 return node
1307 }
1308
1309 /**
1310 * Parse a custom node handler. A node handler can be used to process

Callers 1

parseNullishCoalescingFunction · 0.85

Calls 4

hasOwnPropertyFunction · 0.90
parseCustomNodesFunction · 0.85
getTokenFunction · 0.85
parseAccessorsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…