MCPcopy Index your code
hub / github.com/gpujs/gpu.js / astAssignmentExpression

Method astAssignmentExpression

src/backend/cpu/function-node.js:282–291  ·  view source on GitHub ↗

* @desc Parses the abstract syntax tree for *Assignment* Expression * @param {Object} assNode - An ast Node * @param {Array} retArr - return array string * @returns {Array} the append retArr

(assNode, retArr)

Source from the content-addressed store, hash-verified

280 * @returns {Array} the append retArr
281 */
282 astAssignmentExpression(assNode, retArr) {
283 const declaration = this.getDeclaration(assNode.left);
284 if (declaration && !declaration.assignable) {
285 throw this.astErrorOutput(`Variable ${assNode.left.name} is not assignable here`, assNode);
286 }
287 this.astGeneric(assNode.left, retArr);
288 retArr.push(assNode.operator);
289 this.astGeneric(assNode.right, retArr);
290 return retArr;
291 }
292
293 /**
294 * @desc Parses the abstract syntax tree for *Block* statement

Callers

nothing calls this directly

Calls 3

astErrorOutputMethod · 0.80
astGenericMethod · 0.80
getDeclarationMethod · 0.45

Tested by

no test coverage detected