(params, kind)
| 37875 | } |
| 37876 | |
| 37877 | function parsePattern(params, kind) { |
| 37878 | if (match('[')) { |
| 37879 | return parseArrayPattern(params, kind); |
| 37880 | } else if (match('{')) { |
| 37881 | return parseObjectPattern(params, kind); |
| 37882 | } else if (matchKeyword('let')) { |
| 37883 | if (kind === 'const' || kind === 'let') { |
| 37884 | tolerateUnexpectedToken(lookahead, Messages.UnexpectedToken); |
| 37885 | } |
| 37886 | } |
| 37887 | |
| 37888 | params.push(lookahead); |
| 37889 | return parseVariableIdentifier(kind); |
| 37890 | } |
| 37891 | |
| 37892 | function parsePatternWithDefault(params, kind) { |
| 37893 | var startToken = lookahead, pattern, previousAllowYield, right; |
no test coverage detected