MCPcopy
hub / github.com/vercel/hyper / next

Method next

bin/yarn-standalone.js:34592–34607  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34590 }
34591
34592 next() {
34593 const item = this.tokens.next();
34594 (0, (_invariant || _load_invariant()).default)(item, 'expected a token');
34595
34596 const done = item.done,
34597 value = item.value;
34598
34599 if (done || !value) {
34600 throw new Error('No more tokens');
34601 } else if (value.type === TOKEN_TYPES.comment) {
34602 this.onComment(value);
34603 return this.next();
34604 } else {
34605 return this.token = value;
34606 }
34607 }
34608
34609 unexpected(msg = 'Unexpected token') {
34610 throw new SyntaxError(`${msg} ${this.token.line}:${this.token.col} in ${this.fileLoc}`);

Callers 15

expectMethod · 0.95
eatMethod · 0.95
parseMethod · 0.95
parseFunction · 0.95
renderMethod · 0.45
fulfilledFunction · 0.45
__awaiterFunction · 0.45
__readFunction · 0.45
yarn-standalone.jsFile · 0.45
getLockfileMethod · 0.45
nullifyFunction · 0.45
fetchRequestFromCwdMethod · 0.45

Calls 2

onCommentMethod · 0.95
_load_invariantFunction · 0.85

Tested by

no test coverage detected