MCPcopy Create free account
hub / github.com/davidkingzyb/SCAST / parseExprList

Function parseExprList

lib/filbert.js:2646–2658  ·  view source on GitHub ↗
(close, allowTrailingComma, allowEmpty)

Source from the content-addressed store, hash-verified

2644 // for array literals).
2645
2646 function parseExprList(close, allowTrailingComma, allowEmpty) {
2647 var elts = [], first = true;
2648 while (!eat(close)) {
2649 if (!first) {
2650 expect(_comma);
2651 if (allowTrailingComma && options.allowTrailingCommas && eat(close)) break;
2652 } else first = false;
2653
2654 if (allowEmpty && tokType === _comma) elts.push(null);
2655 else elts.push(parseExprOps(false));
2656 }
2657 return elts;
2658 }
2659
2660 function parseParamsList() {
2661 // In: expr, expr, ..., id=expr, id=expr, ...

Callers 2

parseSubscriptsFunction · 0.85
parseListFunction · 0.85

Calls 3

eatFunction · 0.85
expectFunction · 0.85
parseExprOpsFunction · 0.85

Tested by

no test coverage detected