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

Method astUnaryExpression

src/backend/function-node.js:1142–1157  ·  view source on GitHub ↗

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

(uNode, retArr)

Source from the content-addressed store, hash-verified

1140 * @returns {Array} the append retArr
1141 */
1142 astUnaryExpression(uNode, retArr) {
1143 const unaryResult = this.checkAndUpconvertBitwiseUnary(uNode, retArr);
1144 if (unaryResult) {
1145 return retArr;
1146 }
1147
1148 if (uNode.prefix) {
1149 retArr.push(uNode.operator);
1150 this.astGeneric(uNode.argument, retArr);
1151 } else {
1152 this.astGeneric(uNode.argument, retArr);
1153 retArr.push(uNode.operator);
1154 }
1155
1156 return retArr;
1157 }
1158
1159 checkAndUpconvertBitwiseUnary(uNode, retArr) {}
1160

Callers 1

astGenericMethod · 0.95

Calls 2

astGenericMethod · 0.95

Tested by

no test coverage detected