MCPcopy
hub / github.com/DHTMLX/gantt / expect

Function expect

samples/common/codehighlight/javascript.js:359–366  ·  view source on GitHub ↗
(wanted)

Source from the content-addressed store, hash-verified

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

Callers 15

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

Calls

no outgoing calls

Tested by

no test coverage detected