MCPcopy Create free account
hub / github.com/node-inspector/node-inspector / expr_atom

Function expr_atom

front-end/UglifyJS/parse-js.js:992–1027  ·  view source on GitHub ↗
(allow_calls)

Source from the content-addressed store, hash-verified

990 };
991
992 function expr_atom(allow_calls) {
993 if (is("operator", "new")) {
994 next();
995 return new_();
996 }
997 if (is("operator") && HOP(UNARY_PREFIX, S.token.value)) {
998 return make_unary("unary-prefix",
999 prog1(S.token.value, next),
1000 expr_atom(allow_calls));
1001 }
1002 if (is("punc")) {
1003 switch (S.token.value) {
1004 case "(":
1005 next();
1006 return subscripts(prog1(expression, curry(expect, ")")), allow_calls);
1007 case "[":
1008 next();
1009 return subscripts(array_(), allow_calls);
1010 case "{":
1011 next();
1012 return subscripts(object_(), allow_calls);
1013 }
1014 unexpected();
1015 }
1016 if (is("keyword", "function")) {
1017 next();
1018 return subscripts(function_(false), allow_calls);
1019 }
1020 if (HOP(ATOMIC_START_TOKEN, S.token.type)) {
1021 var atom = S.token.type == "regexp"
1022 ? as("regexp", S.token.value[0], S.token.value[1])
1023 : as(S.token.type, S.token.value);
1024 return subscripts(prog1(atom, next), allow_calls);
1025 }
1026 unexpected();
1027 };
1028
1029 function expr_list(closing, allow_trailing_comma, allow_empty) {
1030 var first = true, a = [];

Callers 3

new_Function · 0.85
expr_opFunction · 0.85
expr_opsFunction · 0.85

Calls 13

isFunction · 0.85
nextFunction · 0.85
new_Function · 0.85
HOPFunction · 0.85
make_unaryFunction · 0.85
prog1Function · 0.85
subscriptsFunction · 0.85
curryFunction · 0.85
array_Function · 0.85
object_Function · 0.85
unexpectedFunction · 0.85
function_Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…