(kind, options)
| 3278 | } |
| 3279 | |
| 3280 | function parseLexicalBinding(kind, options) { |
| 3281 | var init = null, id, node = new Node(); |
| 3282 | |
| 3283 | id = parsePattern(); |
| 3284 | |
| 3285 | // 12.2.1 |
| 3286 | if (strict && id.type === Syntax.Identifier && isRestrictedWord(id.name)) { |
| 3287 | tolerateError(Messages.StrictVarName); |
| 3288 | } |
| 3289 | |
| 3290 | if (kind === 'const') { |
| 3291 | if (!matchKeyword('in')) { |
| 3292 | expect('='); |
| 3293 | init = parseAssignmentExpression(); |
| 3294 | } |
| 3295 | } else if ((!options.inFor && id.type !== Syntax.Identifier) || match('=')) { |
| 3296 | expect('='); |
| 3297 | init = parseAssignmentExpression(); |
| 3298 | } |
| 3299 | |
| 3300 | return node.finishVariableDeclarator(id, init); |
| 3301 | } |
| 3302 | |
| 3303 | function parseBindingList(kind, options) { |
| 3304 | var list = []; |
no test coverage detected