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

Function objprop

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

Source from the content-addressed store, hash-verified

520 if (type == "variable") {cx.marked = "property"; return cont();}
521 }
522 function objprop(type, value) {
523 if (type == "async") {
524 cx.marked = "property";
525 return cont(objprop);
526 } else if (type == "variable" || cx.style == "keyword") {
527 cx.marked = "property";
528 if (value == "get" || value == "set") return cont(getterSetter);
529 var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params
530 if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false)))
531 cx.state.fatArrowAt = cx.stream.pos + m[0].length
532 return cont(afterprop);
533 } else if (type == "number" || type == "string") {
534 cx.marked = jsonldMode ? "property" : (cx.style + " property");
535 return cont(afterprop);
536 } else if (type == "jsonld-keyword") {
537 return cont(afterprop);
538 } else if (isTS && isModifier(value)) {
539 cx.marked = "keyword"
540 return cont(objprop)
541 } else if (type == "[") {
542 return cont(expression, maybetype, expect("]"), afterprop);
543 } else if (type == "spread") {
544 return cont(expressionNoComma, afterprop);
545 } else if (value == "*") {
546 cx.marked = "keyword";
547 return cont(objprop);
548 } else if (type == ":") {
549 return pass(afterprop)
550 }
551 }
552 function getterSetter(type) {
553 if (type != "variable") return pass(afterprop);
554 cx.marked = "property";

Callers

nothing calls this directly

Calls 4

contFunction · 0.85
isModifierFunction · 0.85
expectFunction · 0.85
passFunction · 0.85

Tested by

no test coverage detected