MCPcopy
hub / github.com/jagenjo/webglstudio.js / expression

Function expression

editor/js/extra/codemirror/javascript.js:271–280  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

269 return pass(pushlex("stat"), expression, expect(";"), poplex);
270 }
271 function expression(type) {
272 if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator);
273 if (type == "function") return cont(functiondef);
274 if (type == "keyword c") return cont(maybeexpression);
275 if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeoperator);
276 if (type == "operator") return cont(expression);
277 if (type == "[") return cont(pushlex("]"), commasep(expression, "]"), poplex, maybeoperator);
278 if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator);
279 return cont();
280 }
281 function maybeexpression(type) {
282 if (type.match(/[;\}\)\],]/)) return pass();
283 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