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

Function expect

static/editor.md/lib/codemirror/mode/javascript/javascript.js:321–328  ·  view source on GitHub ↗
(wanted)

Source from the content-addressed store, hash-verified

319 poplex.lex = true;
320
321 function expect(wanted) {
322 function exp(type) {
323 if (type == wanted) return cont();
324 else if (wanted == ";") return pass();
325 else return cont(exp);
326 };
327 return exp;
328 }
329
330 function statement(type, value) {
331 if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex);

Callers 12

statementFunction · 0.70
expressionInnerFunction · 0.70
maybeoperatorNoCommaFunction · 0.70
maybelabelFunction · 0.70
objpropFunction · 0.70
proceedFunction · 0.70
proppatternFunction · 0.70
forspecFunction · 0.70
forspec1Function · 0.70
forspec2Function · 0.70
afterExportFunction · 0.70
maybeArrayComprehensionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected