MCPcopy Create free account
hub / github.com/Paxa/postbird / proppattern

Function proppattern

public/codemirror/javascript/javascript.js:579–588  ·  view source on GitHub ↗
(type, value)

Source from the content-addressed store, hash-verified

577 if (type == "{") return contCommasep(proppattern, "}");
578 }
579 function proppattern(type, value) {
580 if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
581 register(value);
582 return cont(maybeAssign);
583 }
584 if (type == "variable") cx.marked = "property";
585 if (type == "spread") return cont(pattern);
586 if (type == "}") return pass();
587 return cont(expect(":"), pattern, maybeAssign);
588 }
589 function maybeAssign(_type, value) {
590 if (value == "=") return cont(expressionNoComma);
591 }

Callers

nothing calls this directly

Calls 5

registerFunction · 0.85
contFunction · 0.85
passFunction · 0.85
expectFunction · 0.85
matchMethod · 0.80

Tested by

no test coverage detected