MCPcopy Index your code
hub / github.com/reactjs/react-rails / parseClassDeclaration

Function parseClassDeclaration

lib/assets/javascripts/JSXTransformer.js:8644–8679  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

parseStatementFunction · 0.85

Calls 12

markerCreateFunction · 0.85
expectKeywordFunction · 0.85
parseVariableIdentifierFunction · 0.85
matchFunction · 0.85
matchKeywordFunction · 0.85
matchContextualKeywordFunction · 0.85
parseClassImplementsFunction · 0.85
markerApplyFunction · 0.85
parseClassBodyFunction · 0.85

Tested by

no test coverage detected