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

Function maybeoperator

mini-code-edit/cm/mode/javascript/javascript.js:244–251  ·  view source on GitHub ↗
(type, value)

Source from the content-addressed store, hash-verified

242 }
243
244 function maybeoperator(type, value) {
245 if (type == "operator" && /\+\+|--/.test(value)) return cont(maybeoperator);
246 if (type == "operator" || type == ":") return cont(expression);
247 if (type == ";") return;
248 if (type == "(") return cont(pushlex(")"), commasep(expression, ")"), poplex, maybeoperator);
249 if (type == ".") return cont(property, maybeoperator);
250 if (type == "[") return cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator);
251 }
252 function maybelabel(type) {
253 if (type == ":") return cont(poplex, statement);
254 return pass(maybeoperator, expect(";"), poplex);

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