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

Function classBody

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

Source from the content-addressed store, hash-verified

757 if (type == "{") return cont(pushlex("}"), classBody, poplex);
758 }
759 function classBody(type, value) {
760 if (type == "async" ||
761 (type == "variable" &&
762 (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
763 cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
764 cx.marked = "keyword";
765 return cont(classBody);
766 }
767 if (type == "variable" || cx.style == "keyword") {
768 cx.marked = "property";
769 return cont(classfield, classBody);
770 }
771 if (type == "number" || type == "string") return cont(classfield, classBody);
772 if (type == "[")
773 return cont(expression, maybetype, expect("]"), classfield, classBody)
774 if (value == "*") {
775 cx.marked = "keyword";
776 return cont(classBody);
777 }
778 if (isTS && type == "(") return pass(functiondecl, classBody)
779 if (type == ";" || type == ",") return cont(classBody);
780 if (type == "}") return cont();
781 if (value == "@") return cont(expression, classBody)
782 }
783 function classfield(type, value) {
784 if (value == "?") return cont(classfield)
785 if (type == ":") return cont(typeexpr, maybeAssign)

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