()
| 8642 | } |
| 8643 | |
| 8644 | function parseClassDeclaration() { |
| 8645 | var id, implemented, previousYieldAllowed, superClass = null, |
| 8646 | superTypeParameters, marker = markerCreate(), typeParameters; |
| 8647 | |
| 8648 | expectKeyword('class'); |
| 8649 | |
| 8650 | id = parseVariableIdentifier(); |
| 8651 | |
| 8652 | if (match('<')) { |
| 8653 | typeParameters = parseTypeParameterDeclaration(); |
| 8654 | } |
| 8655 | |
| 8656 | if (matchKeyword('extends')) { |
| 8657 | expectKeyword('extends'); |
| 8658 | previousYieldAllowed = state.yieldAllowed; |
| 8659 | state.yieldAllowed = false; |
| 8660 | superClass = parseLeftHandSideExpressionAllowCall(); |
| 8661 | if (match('<')) { |
| 8662 | superTypeParameters = parseTypeParameterInstantiation(); |
| 8663 | } |
| 8664 | state.yieldAllowed = previousYieldAllowed; |
| 8665 | } |
| 8666 | |
| 8667 | if (strict ? matchKeyword('implements') : matchContextualKeyword('implements')) { |
| 8668 | implemented = parseClassImplements(); |
| 8669 | } |
| 8670 | |
| 8671 | return markerApply(marker, delegate.createClassDeclaration( |
| 8672 | id, |
| 8673 | superClass, |
| 8674 | parseClassBody(), |
| 8675 | typeParameters, |
| 8676 | superTypeParameters, |
| 8677 | implemented |
| 8678 | )); |
| 8679 | } |
| 8680 | |
| 8681 | // 15 Program |
| 8682 |
no test coverage detected