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

Method parse

www/js/_hyperscript.esm.js:4390–4406  ·  view source on GitHub ↗
(parser, root)

Source from the content-addressed store, hash-verified

4388 this._parseRoot = root;
4389 }
4390 static parse(parser, root) {
4391 if (!parser.matchOpToken("(")) return;
4392 var args = [];
4393 if (!parser.matchOpToken(")")) {
4394 do {
4395 args.push(parser.requireElement("expression"));
4396 } while (parser.matchOpToken(","));
4397 parser.requireOpToken(")");
4398 }
4399 var functionCall;
4400 if (root.root) {
4401 functionCall = new _FunctionCall(root, args, { target: root.root, argVals: args }, true);
4402 } else {
4403 functionCall = new _FunctionCall(root, args, { target: root, argVals: args }, false);
4404 }
4405 return parser.parseElement("indirectExpression", functionCall);
4406 }
4407 resolve(context, { target, argVals }) {
4408 if (this._isMethodCall) {
4409 context.meta.runtime.nullCheck(target, this._parseRoot.root);

Callers

nothing calls this directly

Calls 4

matchOpTokenMethod · 0.45
requireElementMethod · 0.45
requireOpTokenMethod · 0.45
parseElementMethod · 0.45

Tested by

no test coverage detected