(fnparam, prop)
| 20446 | // argument |
| 20447 | // prop means that this identifier is that of an object property |
| 20448 | function identifier(fnparam, prop) { |
| 20449 | var i = optionalidentifier(fnparam, prop, false); |
| 20450 | if (i) { |
| 20451 | return i; |
| 20452 | } |
| 20453 | |
| 20454 | // parameter destructuring with rest operator |
| 20455 | if (state.tokens.next.value === "...") { |
| 20456 | if (!state.inES6(true)) { |
| 20457 | warning("W119", state.tokens.next, "spread/rest operator", "6"); |
| 20458 | } |
| 20459 | advance(); |
| 20460 | |
| 20461 | if (checkPunctuator(state.tokens.next, "...")) { |
| 20462 | warning("E024", state.tokens.next, "..."); |
| 20463 | while (checkPunctuator(state.tokens.next, "...")) { |
| 20464 | advance(); |
| 20465 | } |
| 20466 | } |
| 20467 | |
| 20468 | if (!state.tokens.next.identifier) { |
| 20469 | warning("E024", state.tokens.curr, state.tokens.next.id); |
| 20470 | return; |
| 20471 | } |
| 20472 | |
| 20473 | return identifier(fnparam, prop); |
| 20474 | } else { |
| 20475 | error("E030", state.tokens.next, state.tokens.next.value); |
| 20476 | |
| 20477 | // The token should be consumed after a warning is issued so the parser |
| 20478 | // can continue as though an identifier were found. The semicolon token |
| 20479 | // should not be consumed in this way so that the parser interprets it as |
| 20480 | // a statement delimeter; |
| 20481 | if (state.tokens.next.id !== ";") { |
| 20482 | advance(); |
| 20483 | } |
| 20484 | } |
| 20485 | } |
| 20486 | |
| 20487 | |
| 20488 | function reachable(controlToken) { |
no test coverage detected