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

Function parseProgramElement

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

Source from the content-addressed store, hash-verified

8738 }
8739
8740 function parseProgramElement() {
8741 var isModule = extra.sourceType === 'module' || extra.sourceType === 'nonStrictModule';
8742
8743 if (isModule && lookahead.type === Token.Keyword) {
8744 switch (lookahead.value) {
8745 case 'export':
8746 return parseExportDeclaration();
8747 case 'import':
8748 return parseImportDeclaration();
8749 }
8750 }
8751
8752 return parseSourceElement();
8753 }
8754
8755 function parseProgramElements() {
8756 var sourceElement, sourceElements = [], token, directive, firstRestricted;

Callers 1

parseProgramElementsFunction · 0.85

Calls 3

parseExportDeclarationFunction · 0.85
parseImportDeclarationFunction · 0.85
parseSourceElementFunction · 0.85

Tested by

no test coverage detected