MCPcopy
hub / github.com/jquery/esprima / nextRegexToken

Method nextRegexToken

src/parser.ts:356–373  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

354 }
355
356 nextRegexToken(): RawToken {
357 this.collectComments();
358
359 const token = this.scanner.scanRegExp();
360 if (this.config.tokens) {
361 // Pop the previous token, '/' or '/='
362 // This is added from the lookahead token.
363 this.tokens.pop();
364
365 this.tokens.push(this.convertToken(token));
366 }
367
368 // Prime the next lookahead.
369 this.lookahead = token;
370 this.nextToken();
371
372 return token;
373 }
374
375 createNode(): Marker {
376 return {

Callers 1

Calls 5

collectCommentsMethod · 0.95
convertTokenMethod · 0.95
nextTokenMethod · 0.95
scanRegExpMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected