MCPcopy
hub / github.com/mishoo/UglifyJS-old / expr_list

Function expr_list

lib/parse-js.js:1127–1140  ·  view source on GitHub ↗
(closing, allow_trailing_comma, allow_empty)

Source from the content-addressed store, hash-verified

1125 });
1126
1127 function expr_list(closing, allow_trailing_comma, allow_empty) {
1128 var first = true, a = [];
1129 while (!is("punc", closing)) {
1130 if (first) first = false; else expect(",");
1131 if (allow_trailing_comma && is("punc", closing)) break;
1132 if (is("punc", ",") && allow_empty) {
1133 a.push([ "atom", "undefined" ]);
1134 } else {
1135 a.push(expression(false));
1136 }
1137 }
1138 next();
1139 return a;
1140 };
1141
1142 function array_() {
1143 return as("array", expr_list("]", !exigent_mode, true));

Callers 3

new_Function · 0.85
array_Function · 0.85
subscriptsFunction · 0.85

Calls 3

isFunction · 0.85
expectFunction · 0.85
nextFunction · 0.85

Tested by

no test coverage detected