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

Method parse

www/js/_hyperscript.js:4392–4408  ·  view source on GitHub ↗
(parser, root)

Source from the content-addressed store, hash-verified

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