(s, f, p)
| 3460 | } |
| 3461 | |
| 3462 | function assignop(s, f, p) { |
| 3463 | var x = infix(s, typeof f === "function" ? f : function (left, that) { |
| 3464 | that.left = left; |
| 3465 | |
| 3466 | if (left) { |
| 3467 | if (state.option.freeze) { |
| 3468 | var nativeObject = findNativePrototype(left); |
| 3469 | if (nativeObject) |
| 3470 | warning("W121", left, nativeObject); |
| 3471 | } |
| 3472 | |
| 3473 | if (predefined[left.value] === false && |
| 3474 | scope[left.value]["(global)"] === true) { |
| 3475 | warning("W020", left); |
| 3476 | } else if (left["function"]) { |
| 3477 | warning("W021", left, left.value); |
| 3478 | } |
| 3479 | |
| 3480 | if (funct[left.value] === "const") { |
| 3481 | error("E013", left, left.value); |
| 3482 | } |
| 3483 | |
| 3484 | if (left.id === ".") { |
| 3485 | if (!left.left) { |
| 3486 | warning("E031", that); |
| 3487 | } else if (left.left.value === "arguments" && !state.directive["use strict"]) { |
| 3488 | warning("E031", that); |
| 3489 | } |
| 3490 | |
| 3491 | state.nameStack.set(state.tokens.prev); |
| 3492 | that.right = expression(10); |
| 3493 | return that; |
| 3494 | } else if (left.id === "[") { |
| 3495 | if (state.tokens.curr.left.first) { |
| 3496 | state.tokens.curr.left.first.forEach(function (t) { |
| 3497 | if (t && funct[t.value] === "const") { |
| 3498 | error("E013", t, t.value); |
| 3499 | } |
| 3500 | }); |
| 3501 | } else if (!left.left) { |
| 3502 | warning("E031", that); |
| 3503 | } else if (left.left.value === "arguments" && !state.directive["use strict"]) { |
| 3504 | warning("E031", that); |
| 3505 | } |
| 3506 | |
| 3507 | state.nameStack.set(left.right); |
| 3508 | |
| 3509 | that.right = expression(10); |
| 3510 | return that; |
| 3511 | } else if (left.identifier && !isReserved(left)) { |
| 3512 | if (funct[left.value] === "exception") { |
| 3513 | warning("W022", left); |
| 3514 | } |
| 3515 | state.nameStack.set(left); |
| 3516 | that.right = expression(10); |
| 3517 | return that; |
| 3518 | } |
| 3519 |
no test coverage detected