MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / raiseError

Method raiseError

tools/common/_hyperscript.iife.js:1239–1243  ·  view source on GitHub ↗
(message, expected)

Source from the content-addressed store, hash-verified

1237 return this.#kernel.parseAnyOf(types, this);
1238 }
1239 raiseError(message, expected) {
1240 message = message || "Unexpected Token : " + this.currentToken().value;
1241 var parseError = new ParseError(message, this.currentToken(), this.source, expected);
1242 throw new ParseRecoverySentinel(parseError);
1243 }
1244 raiseExpected(...expected) {
1245 var msg = expected.length === 1 ? "Expected '" + expected[0] + "' but found '" + this.currentToken().value + "'" : "Expected one of: " + expected.map((e) => "'" + e + "'").join(", ");
1246 this.raiseError(msg, expected);

Callers 15

raiseExpectedMethod · 0.95
requireElementMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45

Calls 1

currentTokenMethod · 0.95

Tested by

no test coverage detected