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

Method parseCommandList

tools/common/_hyperscript.iife.js:1374–1396  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

1372 return commandElement;
1373 }
1374 parseCommandList(parser) {
1375 if (parser.hasMore()) {
1376 var keyword = parser.currentToken().value;
1377 var cmd;
1378 try {
1379 cmd = parser.parseElement("command");
1380 } catch (e) {
1381 if (e instanceof ParseRecoverySentinel) {
1382 cmd = new FailedCommand(e.parseError, keyword);
1383 this.#syncToCommand(parser);
1384 } else {
1385 throw e;
1386 }
1387 }
1388 if (cmd) {
1389 parser.matchToken("then");
1390 const next = parser.parseElement("commandList");
1391 if (next) cmd.next = next;
1392 return cmd;
1393 }
1394 }
1395 return new EmptyCommandListCommand();
1396 }
1397 parseLeaf(parser) {
1398 var result = parser.parseAnyOf(this.#leafExpressions);
1399 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