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

Method parseCommandList

www/js/_hyperscript-max.js:1383–1405  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

1381 return commandElement;
1382 }
1383 parseCommandList(parser) {
1384 if (parser.hasMore()) {
1385 var keyword = parser.currentToken().value;
1386 var cmd;
1387 try {
1388 cmd = parser.parseElement("command");
1389 } catch (e) {
1390 if (e instanceof ParseRecoverySentinel) {
1391 cmd = new FailedCommand(e.parseError, keyword);
1392 this.#syncToCommand(parser);
1393 } else {
1394 throw e;
1395 }
1396 }
1397 if (cmd) {
1398 parser.matchToken("then");
1399 const next = parser.parseElement("commandList");
1400 if (next) cmd.next = next;
1401 return cmd;
1402 }
1403 }
1404 return new EmptyCommandListCommand();
1405 }
1406 parseLeaf(parser) {
1407 var result = parser.parseAnyOf(this.#leafExpressions);
1408 if (result == null) {

Callers

nothing calls this directly

Calls 5

hasMoreMethod · 0.45
currentTokenMethod · 0.45
parseElementMethod · 0.45
#syncToCommandMethod · 0.45
matchTokenMethod · 0.45

Tested by

no test coverage detected