MCPcopy Index your code
hub / github.com/tc39/proposal-observable / eat

Function eat

demo/parser.js:32–41  ·  view source on GitHub ↗
(type = "")

Source from the content-addressed store, hash-verified

30 }
31
32 function* eat(type = "") {
33
34 let token = yield * peek();
35
36 if (type && token.type !== type)
37 throw new SyntaxError("Expected " + type);
38
39 current = null;
40 return token;
41 }
42
43 function* parseAdd() {
44

Callers 3

parseAddFunction · 0.85
parseMultiplyFunction · 0.85
startFunction · 0.85

Calls 1

peekFunction · 0.85

Tested by

no test coverage detected