MCPcopy Create free account
hub / github.com/TruthHun/BookStack / objprop

Function objprop

static/editor.md/lib/codemirror/mode/javascript/javascript.js:435–448  ·  view source on GitHub ↗
(type, value)

Source from the content-addressed store, hash-verified

433 if (type == "variable") {cx.marked = "property"; return cont();}
434 }
435 function objprop(type, value) {
436 if (type == "variable" || cx.style == "keyword") {
437 cx.marked = "property";
438 if (value == "get" || value == "set") return cont(getterSetter);
439 return cont(afterprop);
440 } else if (type == "number" || type == "string") {
441 cx.marked = jsonldMode ? "property" : (cx.style + " property");
442 return cont(afterprop);
443 } else if (type == "jsonld-keyword") {
444 return cont(afterprop);
445 } else if (type == "[") {
446 return cont(expression, expect("]"), afterprop);
447 }
448 }
449 function getterSetter(type) {
450 if (type != "variable") return pass(afterprop);
451 cx.marked = "property";

Callers

nothing calls this directly

Calls 2

contFunction · 0.70
expectFunction · 0.70

Tested by

no test coverage detected