MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / objprop

Function objprop

lib/web/CodeMirror/mode/javascript/javascript.js:519–548  ·  view source on GitHub ↗
(type, value)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

isModifierFunction · 0.85
contFunction · 0.70
expectFunction · 0.70
passFunction · 0.70
matchMethod · 0.45

Tested by

no test coverage detected