MCPcopy
hub / github.com/hokein/electron-sample-apps / block

Function block

mini-code-editor/cm/mode/rust/rust.js:175–187  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

173 return cont(pushlex("stat", tag), comb, poplex, block);
174 }
175 function block(type) {
176 if (type == "}") return cont();
177 if (type == "let") return stat_of(letdef1, "let");
178 if (type == "fn") return stat_of(fndef);
179 if (type == "type") return cont(pushlex("stat"), tydef, endstatement, poplex, block);
180 if (type == "enum") return stat_of(enumdef);
181 if (type == "mod") return stat_of(mod);
182 if (type == "iface") return stat_of(iface);
183 if (type == "impl") return stat_of(impl);
184 if (type == "open-attr") return cont(pushlex("]"), commasep(expression, "]"), poplex);
185 if (type == "ignore" || type.match(/[\]\);,]/)) return cont(block);
186 return pass(pushlex("stat"), expression, poplex, endstatement, block);
187 }
188 function endstatement(type) {
189 if (type == ";") return cont();
190 return pass();

Callers

nothing calls this directly

Calls 5

stat_ofFunction · 0.85
contFunction · 0.70
pushlexFunction · 0.70
commasepFunction · 0.70
passFunction · 0.70

Tested by

no test coverage detected