| 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)); |