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

Function object_

lib/parse-js.js:1146–1164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1144 };
1145
1146 function object_() {
1147 var first = true, a = [];
1148 while (!is("punc", "}")) {
1149 if (first) first = false; else expect(",");
1150 if (!exigent_mode && is("punc", "}"))
1151 // allow trailing comma
1152 break;
1153 var type = S.token.type;
1154 var name = as_property_name();
1155 if (type == "name" && (name == "get" || name == "set") && !is("punc", ":")) {
1156 a.push([ as_name(), function_(false), name ]);
1157 } else {
1158 expect(":");
1159 a.push([ name, expression(false) ]);
1160 }
1161 }
1162 next();
1163 return as("object", a);
1164 };
1165
1166 function as_property_name() {
1167 switch (S.token.type) {

Callers 1

parseFunction · 0.85

Calls 7

isFunction · 0.85
expectFunction · 0.85
as_property_nameFunction · 0.85
as_nameFunction · 0.85
function_Function · 0.85
nextFunction · 0.85
asFunction · 0.85

Tested by

no test coverage detected