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

Method throwUnexpectedToken

src/scanner.ts:100–103  ·  view source on GitHub ↗
(message = Messages.UnexpectedTokenIllegal)

Source from the content-addressed store, hash-verified

98 }
99
100 public throwUnexpectedToken(message = Messages.UnexpectedTokenIllegal): never {
101 return this.errorHandler.throwError(this.index, this.lineNumber,
102 this.index - this.lineStart + 1, message);
103 }
104
105 private tolerateUnexpectedToken(message = Messages.UnexpectedTokenIllegal) {
106 this.errorHandler.tolerateError(this.index, this.lineNumber,

Callers 11

getComplexIdentifierMethod · 0.95
scanPunctuatorMethod · 0.95
scanHexLiteralMethod · 0.95
scanBinaryLiteralMethod · 0.95
scanOctalLiteralMethod · 0.95
scanNumericLiteralMethod · 0.95
scanStringLiteralMethod · 0.95
scanTemplateMethod · 0.95
testRegExpMethod · 0.95
scanRegExpBodyMethod · 0.95

Calls 1

throwErrorMethod · 0.45

Tested by

no test coverage detected