()
| 8597 | } |
| 8598 | |
| 8599 | function parseClassExpression() { |
| 8600 | var id, implemented, previousYieldAllowed, superClass = null, |
| 8601 | superTypeParameters, marker = markerCreate(), typeParameters, |
| 8602 | matchImplements; |
| 8603 | |
| 8604 | expectKeyword('class'); |
| 8605 | |
| 8606 | matchImplements = |
| 8607 | strict |
| 8608 | ? matchKeyword('implements') |
| 8609 | : matchContextualKeyword('implements'); |
| 8610 | |
| 8611 | if (!matchKeyword('extends') && !matchImplements && !match('{')) { |
| 8612 | id = parseVariableIdentifier(); |
| 8613 | } |
| 8614 | |
| 8615 | if (match('<')) { |
| 8616 | typeParameters = parseTypeParameterDeclaration(); |
| 8617 | } |
| 8618 | |
| 8619 | if (matchKeyword('extends')) { |
| 8620 | expectKeyword('extends'); |
| 8621 | previousYieldAllowed = state.yieldAllowed; |
| 8622 | state.yieldAllowed = false; |
| 8623 | superClass = parseLeftHandSideExpressionAllowCall(); |
| 8624 | if (match('<')) { |
| 8625 | superTypeParameters = parseTypeParameterInstantiation(); |
| 8626 | } |
| 8627 | state.yieldAllowed = previousYieldAllowed; |
| 8628 | } |
| 8629 | |
| 8630 | if (strict ? matchKeyword('implements') : matchContextualKeyword('implements')) { |
| 8631 | implemented = parseClassImplements(); |
| 8632 | } |
| 8633 | |
| 8634 | return markerApply(marker, delegate.createClassExpression( |
| 8635 | id, |
| 8636 | superClass, |
| 8637 | parseClassBody(), |
| 8638 | typeParameters, |
| 8639 | superTypeParameters, |
| 8640 | implemented |
| 8641 | )); |
| 8642 | } |
| 8643 | |
| 8644 | function parseClassDeclaration() { |
| 8645 | var id, implemented, previousYieldAllowed, superClass = null, |
no test coverage detected