MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / parseAnyOf

Method parseAnyOf

www/js/_hyperscript-max.js:1544–1552  ·  view source on GitHub ↗
(types, parser)

Source from the content-addressed store, hash-verified

1542 return result;
1543 }
1544 parseAnyOf(types, parser) {
1545 for (var i = 0; i < types.length; i++) {
1546 var type = types[i];
1547 var expression = this.parseElement(type, parser);
1548 if (expression) {
1549 return expression;
1550 }
1551 }
1552 }
1553 addGrammarElement(name, definition) {
1554 if (this.#grammar[name]) {
1555 throw new Error(`Grammar element '${name}' already exists`);

Callers 6

parseMethod · 0.45
parseAnyOfMethod · 0.45
parseLeafMethod · 0.45
parseUnaryExpressionMethod · 0.45
parseExpressionMethod · 0.45
parseMethod · 0.45

Calls 1

parseElementMethod · 0.45

Tested by

no test coverage detected