MCPcopy Create free account
hub / github.com/Tampermonkey/tampermonkey / expression

Function expression

src/cm/javascript.js:263–272  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

261 return pass(pushlex("stat"), expression, expect(";"), poplex);
262 }
263 function expression(type) {
264 if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator);
265 if (type == "function") return cont(functiondef);
266 if (type == "keyword c") return cont(maybeexpression);
267 if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeoperator);
268 if (type == "operator") return cont(expression);
269 if (type == "[") return cont(pushlex("]"), commasep(expression, "]"), poplex, maybeoperator);
270 if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator);
271 return cont();
272 }
273 function maybeexpression(type) {
274 if (type.match(/[;\}\)\],]/)) return pass();
275 return pass(expression);

Callers

nothing calls this directly

Calls 4

contFunction · 0.85
pushlexFunction · 0.85
expectFunction · 0.85
commasepFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…