()
| 8484 | } |
| 8485 | |
| 8486 | function parseClassElement() { |
| 8487 | var computed = false, generator = false, key, marker = markerCreate(), |
| 8488 | isStatic = false, possiblyOpenBracketToken; |
| 8489 | if (match(';')) { |
| 8490 | lex(); |
| 8491 | return undefined; |
| 8492 | } |
| 8493 | |
| 8494 | if (lookahead.value === 'static') { |
| 8495 | lex(); |
| 8496 | isStatic = true; |
| 8497 | } |
| 8498 | |
| 8499 | if (match('*')) { |
| 8500 | lex(); |
| 8501 | generator = true; |
| 8502 | } |
| 8503 | |
| 8504 | possiblyOpenBracketToken = lookahead; |
| 8505 | if (matchContextualKeyword('get') || matchContextualKeyword('set')) { |
| 8506 | possiblyOpenBracketToken = lookahead2(); |
| 8507 | } |
| 8508 | |
| 8509 | if (possiblyOpenBracketToken.type === Token.Punctuator |
| 8510 | && possiblyOpenBracketToken.value === '[') { |
| 8511 | computed = true; |
| 8512 | } |
| 8513 | |
| 8514 | key = parseObjectPropertyKey(); |
| 8515 | |
| 8516 | if (!generator && lookahead.value === ':') { |
| 8517 | return markerApply(marker, parseClassProperty(key, computed, isStatic)); |
| 8518 | } |
| 8519 | |
| 8520 | return markerApply(marker, parseMethodDefinition( |
| 8521 | key, |
| 8522 | isStatic, |
| 8523 | generator, |
| 8524 | computed |
| 8525 | )); |
| 8526 | } |
| 8527 | |
| 8528 | function parseClassBody() { |
| 8529 | var classElement, classElements = [], existingProps = {}, |
no test coverage detected