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

Function statement

static/editor.md/lib/codemirror/mode/haxe/haxe.js:259–280  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

257 }
258
259 function statement(type) {
260 if (type == "@") return cont(metadef);
261 if (type == "var") return cont(pushlex("vardef"), vardef1, expect(";"), poplex);
262 if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
263 if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
264 if (type == "{") return cont(pushlex("}"), pushcontext, block, poplex, popcontext);
265 if (type == ";") return cont();
266 if (type == "attribute") return cont(maybeattribute);
267 if (type == "function") return cont(functiondef);
268 if (type == "for") return cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"),
269 poplex, statement, poplex);
270 if (type == "variable") return cont(pushlex("stat"), maybelabel);
271 if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
272 block, poplex, poplex);
273 if (type == "case") return cont(expression, expect(":"));
274 if (type == "default") return cont(expect(":"));
275 if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
276 statement, poplex, popcontext);
277 if (type == "import") return cont(importdef, expect(";"));
278 if (type == "typedef") return cont(typedef);
279 return pass(pushlex("stat"), expression, expect(";"), poplex);
280 }
281 function expression(type) {
282 if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator);
283 if (type == "function") return cont(functiondef);

Callers

nothing calls this directly

Calls 4

contFunction · 0.70
pushlexFunction · 0.70
expectFunction · 0.70
passFunction · 0.70

Tested by

no test coverage detected