MCPcopy Create free account
hub / github.com/Paxa/postbird / expressionInner

Function expressionInner

public/codemirror/javascript/javascript.js:389–408  ·  view source on GitHub ↗
(type, noComma)

Source from the content-addressed store, hash-verified

387 return cont(pushlex(")"), expression, expect(")"), poplex)
388 }
389 function expressionInner(type, noComma) {
390 if (cx.state.fatArrowAt == cx.stream.start) {
391 var body = noComma ? arrowBodyNoComma : arrowBody;
392 if (type == "(") return cont(pushcontext, pushlex(")"), commasep(pattern, ")"), poplex, expect("=>"), body, popcontext);
393 else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
394 }
395
396 var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
397 if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
398 if (type == "function") return cont(functiondef, maybeop);
399 if (type == "class") return cont(pushlex("form"), classExpression, poplex);
400 if (type == "keyword c" || type == "async") return cont(noComma ? maybeexpressionNoComma : maybeexpression);
401 if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
402 if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
403 if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
404 if (type == "{") return contCommasep(objprop, "}", null, maybeop);
405 if (type == "quasi") return pass(quasi, maybeop);
406 if (type == "new") return cont(maybeTarget(noComma));
407 return cont();
408 }
409 function maybeexpression(type) {
410 if (type.match(/[;\}\)\],]/)) return pass();
411 return pass(expression);

Callers 2

expressionFunction · 0.85
expressionNoCommaFunction · 0.85

Calls 7

contFunction · 0.85
pushlexFunction · 0.85
commasepFunction · 0.85
expectFunction · 0.85
passFunction · 0.85
contCommasepFunction · 0.85
maybeTargetFunction · 0.85

Tested by

no test coverage detected