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

Method raiseError

www/js/_hyperscript.js:1249–1253  ·  view source on GitHub ↗
(message, expected)

Source from the content-addressed store, hash-verified

1247 return this.#kernel.parseAnyOf(types, this);
1248 }
1249 raiseError(message, expected) {
1250 message = message || "Unexpected Token : " + this.currentToken().value;
1251 var parseError = new ParseError(message, this.currentToken(), this.source, expected);
1252 throw new ParseRecoverySentinel(parseError);
1253 }
1254 raiseExpected(...expected) {
1255 var msg = expected.length === 1 ? "Expected '" + expected[0] + "' but found '" + this.currentToken().value + "'" : "Expected one of: " + expected.map((e) => "'" + e + "'").join(", ");
1256 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