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

Method parse

www/js/_hyperscript.esm.js:8484–8491  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

8482 this.args = { target };
8483 }
8484 static parse(parser) {
8485 if (!parser.matchToken("empty") && !parser.matchToken("clear")) return;
8486 var target = null;
8487 if (!parser.commandBoundary(parser.currentToken())) {
8488 target = parser.requireElement("expression");
8489 }
8490 return new _EmptyCommand(target);
8491 }
8492 resolve(ctx, { target }) {
8493 var elt = target || ctx.me;
8494 if (Array.isArray(elt)) {

Callers

nothing calls this directly

Calls 4

matchTokenMethod · 0.45
commandBoundaryMethod · 0.45
currentTokenMethod · 0.45
requireElementMethod · 0.45

Tested by

no test coverage detected