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

Method parse

www/js/_hyperscript-max.js:4391–4407  ·  view source on GitHub ↗
(parser, root)

Source from the content-addressed store, hash-verified

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