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

Function proppattern

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

Source from the content-addressed store, hash-verified

695 if (type == "{") return contCommasep(proppattern, "}");
696 }
697 function proppattern(type, value) {
698 if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
699 register(value);
700 return cont(maybeAssign);
701 }
702 if (type == "variable") cx.marked = "property";
703 if (type == "spread") return cont(pattern);
704 if (type == "}") return pass();
705 if (type == "[") return cont(expression, expect(']'), expect(':'), proppattern);
706 return cont(expect(":"), pattern, maybeAssign);
707 }
708 function eltpattern() {
709 return pass(pattern, maybeAssign)
710 }

Callers

nothing calls this directly

Calls 4

registerFunction · 0.85
contFunction · 0.85
expectFunction · 0.85
passFunction · 0.70

Tested by

no test coverage detected