MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / expect

Function expect

lib/web/CodeMirror/mode/javascript/javascript.js:355–362  ·  view source on GitHub ↗
(wanted)

Source from the content-addressed store, hash-verified

353 poplex.lex = true;
354
355 function expect(wanted) {
356 function exp(type) {
357 if (type == wanted) return cont();
358 else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass();
359 else return cont(exp);
360 };
361 return exp;
362 }
363
364 function statement(type, value) {
365 if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);

Callers 15

statementFunction · 0.70
maybeCatchBindingFunction · 0.70
parenExprFunction · 0.70
expressionInnerFunction · 0.70
maybeoperatorNoCommaFunction · 0.70
maybelabelFunction · 0.70
objpropFunction · 0.70
proceedFunction · 0.70
typepropFunction · 0.70
afterTypeFunction · 0.70
proppatternFunction · 0.70
classBodyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected