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

Method parse

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

Source from the content-addressed store, hash-verified

7705 this.args = { target: targetExpr };
7706 }
7707 static parse(parser) {
7708 if (!parser.matchToken("hide")) return;
7709 var targetExpr = VisibilityCommand.parseShowHideTarget(parser);
7710 var name = null;
7711 if (parser.matchToken("with")) {
7712 name = parser.requireTokenType("IDENTIFIER", "STYLE_REF").value;
7713 if (name.startsWith("*")) {
7714 name = name.slice(1);
7715 }
7716 }
7717 if (parser.matchToken("when")) {
7718 var when = parser.requireElement("expression");
7719 }
7720 var hideShowStrategy = VisibilityCommand.resolveHideShowStrategy(parser, name);
7721 return new _HideCommand(targetExpr, when, hideShowStrategy);
7722 }
7723 resolve(ctx, { target }) {
7724 var runtime2 = ctx.meta.runtime;
7725 var cmd = this;

Callers

nothing calls this directly

Calls 5

matchTokenMethod · 0.45
parseShowHideTargetMethod · 0.45
requireTokenTypeMethod · 0.45
requireElementMethod · 0.45

Tested by

no test coverage detected