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

Method parse

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

Source from the content-addressed store, hash-verified

5536 this.args = { value: rhs };
5537 }
5538 static parse(parser) {
5539 var op = parser.matchAnyToken("first", "last", "random");
5540 if (!op) return;
5541 parser.matchAnyToken("in", "from", "of");
5542 var rhs = parser.requireElement("unaryExpression");
5543 return new _PositionalExpression(rhs, op.value);
5544 }
5545 resolve(context, { value: rhsVal }) {
5546 if (rhsVal && !Array.isArray(rhsVal)) {
5547 if (rhsVal.children) {

Callers

nothing calls this directly

Calls 2

matchAnyTokenMethod · 0.45
requireElementMethod · 0.45

Tested by

no test coverage detected