MCPcopy Create free account
hub / github.com/feiyu563/PrometheusAlert / objprop

Function objprop

static/plugins/codemirror/mode/javascript/javascript.js:523–552  ·  view source on GitHub ↗
(type, value)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected