MCPcopy
hub / github.com/PaulTaykalo/objc-dependency-visualizer / assignop

Function assignop

Scripts/ace/worker-javascript.js:3622–3691  ·  view source on GitHub ↗
(s, f, p)

Source from the content-addressed store, hash-verified

3620 }
3621
3622 function assignop(s, f, p) {
3623 var x = infix(s, typeof f === "function" ? f : function(left, that) {
3624 that.left = left;
3625
3626 if (left) {
3627 if (state.option.freeze) {
3628 var nativeObject = findNativePrototype(left);
3629 if (nativeObject)
3630 warning("W121", left, nativeObject);
3631 }
3632
3633 if (predefined[left.value] === false &&
3634 scope[left.value]["(global)"] === true) {
3635 warning("W020", left);
3636 } else if (left["function"]) {
3637 warning("W021", left, left.value);
3638 }
3639
3640 if (funct[left.value] === "const") {
3641 error("E013", left, left.value);
3642 }
3643
3644 if (left.id === ".") {
3645 if (!left.left) {
3646 warning("E031", that);
3647 } else if (left.left.value === "arguments" && !state.directive["use strict"]) {
3648 warning("E031", that);
3649 }
3650
3651 state.nameStack.set(state.tokens.prev);
3652 that.right = expression(10);
3653 return that;
3654 } else if (left.id === "[") {
3655 if (state.tokens.curr.left.first) {
3656 state.tokens.curr.left.first.forEach(function(t) {
3657 if (t && funct[t.value] === "const") {
3658 error("E013", t, t.value);
3659 }
3660 });
3661 } else if (!left.left) {
3662 warning("E031", that);
3663 } else if (left.left.value === "arguments" && !state.directive["use strict"]) {
3664 warning("E031", that);
3665 }
3666
3667 state.nameStack.set(left.right);
3668
3669 that.right = expression(10);
3670 return that;
3671 } else if (left.identifier && !isReserved(left)) {
3672 if (funct[left.value] === "exception") {
3673 warning("W022", left);
3674 }
3675 state.nameStack.set(left);
3676 that.right = expression(10);
3677 return that;
3678 }
3679

Callers 2

bitwiseassignopFunction · 0.85

Calls 6

infixFunction · 0.85
findNativePrototypeFunction · 0.85
warningFunction · 0.85
expressionFunction · 0.85
isReservedFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected