MCPcopy Create free account
hub / github.com/dchester/jsonpath / parseSourceElement

Function parseSourceElement

jsonpath.js:3494–3510  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3492 // 14 Program
3493
3494 function parseSourceElement() {
3495 if (lookahead.type === Token.Keyword) {
3496 switch (lookahead.value) {
3497 case 'const':
3498 case 'let':
3499 return parseConstLetDeclaration(lookahead.value);
3500 case 'function':
3501 return parseFunctionDeclaration();
3502 default:
3503 return parseStatement();
3504 }
3505 }
3506
3507 if (lookahead.type !== Token.EOF) {
3508 return parseStatement();
3509 }
3510 }
3511
3512 function parseSourceElements() {
3513 var sourceElement, sourceElements = [], token, directive, firstRestricted;

Callers 3

parseStatementListFunction · 0.85
parseSourceElementsFunction · 0.85

Calls 3

parseConstLetDeclarationFunction · 0.85
parseFunctionDeclarationFunction · 0.85
parseStatementFunction · 0.85

Tested by

no test coverage detected