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

Function matchBrackets

static/editor.md/lib/codemirror/mode/rust/rust.js:381–386  ·  view source on GitHub ↗
(type, comb)

Source from the content-addressed store, hash-verified

379 return pass();
380 }
381 function matchBrackets(type, comb) {
382 if (type == "[") return cont(pushlex("]"), commasep(comb, "]"), poplex);
383 if (type == "(") return cont(pushlex(")"), commasep(comb, ")"), poplex);
384 if (type == "{") return cont(pushlex("}"), commasep(comb, "}"), poplex);
385 return cont();
386 }
387
388 function parse(state, stream, style) {
389 var cc = state.cc;

Callers 5

expressionFunction · 0.70
maybeopFunction · 0.70
rtypeFunction · 0.70
patternFunction · 0.70
macroFunction · 0.70

Calls 3

contFunction · 0.70
pushlexFunction · 0.70
commasepFunction · 0.70

Tested by

no test coverage detected