MCPcopy Index your code
hub / github.com/nwutils/nw-sample-apps / expression

Function expression

mini-code-edit/cm/mode/javascript/javascript.js:229–238  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

227 return pass(pushlex("stat"), expression, expect(";"), poplex);
228 }
229 function expression(type) {
230 if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator);
231 if (type == "function") return cont(functiondef);
232 if (type == "keyword c") return cont(maybeexpression);
233 if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeoperator);
234 if (type == "operator") return cont(expression);
235 if (type == "[") return cont(pushlex("]"), commasep(expression, "]"), poplex, maybeoperator);
236 if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator);
237 return cont();
238 }
239 function maybeexpression(type) {
240 if (type.match(/[;\}\)\],]/)) return pass();
241 return pass(expression);

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected