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

Function subscripts

front-end/UglifyJS/parse-js.js:1089–1107  ·  view source on GitHub ↗
(expr, allow_calls)

Source from the content-addressed store, hash-verified

1087 };
1088
1089 function subscripts(expr, allow_calls) {
1090 if (is("punc", ".")) {
1091 next();
1092 return subscripts(as("dot", expr, as_name()), allow_calls);
1093 }
1094 if (is("punc", "[")) {
1095 next();
1096 return subscripts(as("sub", expr, prog1(expression, curry(expect, "]"))), allow_calls);
1097 }
1098 if (allow_calls && is("punc", "(")) {
1099 next();
1100 return subscripts(as("call", expr, expr_list(")")), true);
1101 }
1102 if (allow_calls && is("operator") && HOP(UNARY_POSTFIX, S.token.value)) {
1103 return prog1(curry(make_unary, "unary-postfix", S.token.value, expr),
1104 next);
1105 }
1106 return expr;
1107 };
1108
1109 function make_unary(tag, op, expr) {
1110 if ((op == "++" || op == "--") && !is_assignable(expr))

Callers 2

new_Function · 0.85
expr_atomFunction · 0.85

Calls 8

isFunction · 0.85
nextFunction · 0.85
asFunction · 0.85
as_nameFunction · 0.85
prog1Function · 0.85
curryFunction · 0.85
expr_listFunction · 0.85
HOPFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…