(kind)
| 2669 | } |
| 2670 | |
| 2671 | function parseVariableDeclaration(kind) { |
| 2672 | var init = null, id, startToken; |
| 2673 | |
| 2674 | startToken = lookahead; |
| 2675 | id = parseVariableIdentifier(); |
| 2676 | |
| 2677 | // 12.2.1 |
| 2678 | if (strict && isRestrictedWord(id.name)) { |
| 2679 | throwErrorTolerant({}, Messages.StrictVarName); |
| 2680 | } |
| 2681 | |
| 2682 | if (kind === 'const') { |
| 2683 | expect('='); |
| 2684 | init = parseAssignmentExpression(); |
| 2685 | } else if (match('=')) { |
| 2686 | lex(); |
| 2687 | init = parseAssignmentExpression(); |
| 2688 | } |
| 2689 | |
| 2690 | return delegate.markEnd(delegate.createVariableDeclarator(id, init), startToken); |
| 2691 | } |
| 2692 | |
| 2693 | function parseVariableDeclarationList(kind) { |
| 2694 | var list = []; |
no test coverage detected