MCPcopy Create free account
hub / github.com/TextGeneratorio/text-generator.io / classBody

Function classBody

static/libs/javascript.js:778–801  ·  view source on GitHub ↗
(type, value)

Source from the content-addressed store, hash-verified

776 if (type == "{") return cont(pushlex("}"), classBody, poplex);
777 }
778 function classBody(type, value) {
779 if (type == "async" ||
780 (type == "variable" &&
781 (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
782 cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
783 cx.marked = "keyword";
784 return cont(classBody);
785 }
786 if (type == "variable" || cx.style == "keyword") {
787 cx.marked = "property";
788 return cont(classfield, classBody);
789 }
790 if (type == "number" || type == "string") return cont(classfield, classBody);
791 if (type == "[")
792 return cont(expression, maybetype, expect("]"), classfield, classBody)
793 if (value == "*") {
794 cx.marked = "keyword";
795 return cont(classBody);
796 }
797 if (isTS && type == "(") return pass(functiondecl, classBody)
798 if (type == ";" || type == ",") return cont(classBody);
799 if (type == "}") return cont();
800 if (value == "@") return cont(expression, classBody)
801 }
802 function classfield(type, value) {
803 if (value == "!") return cont(classfield)
804 if (value == "?") return cont(classfield)

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected