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

Method consumeSemicolon

src/parser.ts:587–598  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

585 }
586
587 consumeSemicolon() {
588 if (this.match(';')) {
589 this.nextToken();
590 } else if (!this.hasLineTerminator) {
591 if (this.lookahead.type !== Token.EOF && !this.match('}')) {
592 this.throwUnexpectedToken(this.lookahead);
593 }
594 this.lastMarker.index = this.startMarker.index;
595 this.lastMarker.line = this.startMarker.line;
596 this.lastMarker.column = this.startMarker.column;
597 }
598 }
599
600 // https://tc39.github.io/ecma262/#sec-primary-expression
601

Callers 13

parseForStatementMethod · 0.95
parseBreakStatementMethod · 0.95
parseReturnStatementMethod · 0.95
parseThrowStatementMethod · 0.95
parseDirectiveMethod · 0.95

Calls 3

matchMethod · 0.95
nextTokenMethod · 0.95
throwUnexpectedTokenMethod · 0.95

Tested by

no test coverage detected