MCPcopy
hub / github.com/DHTMLX/gantt / expressionInner

Function expressionInner

samples/common/codehighlight/javascript.js:430–449  ·  view source on GitHub ↗
(type, value, noComma)

Source from the content-addressed store, hash-verified

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