MCPcopy Create free account
hub / github.com/TextGeneratorio/text-generator.io / expressionInner

Function expressionInner

static/libs/javascript.js:431–450  ·  view source on GitHub ↗
(type, value, noComma)

Source from the content-addressed store, hash-verified

429 return cont(pushlex(")"), maybeexpression, expect(")"), poplex)
430 }
431 function expressionInner(type, value, noComma) {
432 if (cx.state.fatArrowAt == cx.stream.start) {
433 var body = noComma ? arrowBodyNoComma : arrowBody;
434 if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
435 else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
436 }
437
438 var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
439 if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
440 if (type == "function") return cont(functiondef, maybeop);
441 if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); }
442 if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
443 if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
444 if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
445 if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
446 if (type == "{") return contCommasep(objprop, "}", null, maybeop);
447 if (type == "quasi") return pass(quasi, maybeop);
448 if (type == "new") return cont(maybeTarget(noComma));
449 return cont();
450 }
451 function maybeexpression(type) {
452 if (type.match(/[;\}\)\],]/)) return pass();
453 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
contCommasepFunction · 0.85
maybeTargetFunction · 0.85
passFunction · 0.70

Tested by

no test coverage detected