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

Method parse

tools/common/_hyperscript.iife.js:4083–4099  ·  view source on GitHub ↗
(parser, root)

Source from the content-addressed store, hash-verified

4081 this._parseRoot = root;
4082 }
4083 static parse(parser, root) {
4084 if (!parser.matchOpToken("(")) return;
4085 var args = [];
4086 if (!parser.matchOpToken(")")) {
4087 do {
4088 args.push(parser.requireElement("expression"));
4089 } while (parser.matchOpToken(","));
4090 parser.requireOpToken(")");
4091 }
4092 var functionCall;
4093 if (root.root) {
4094 functionCall = new _FunctionCall(root, args, { target: root.root, argVals: args }, true);
4095 } else {
4096 functionCall = new _FunctionCall(root, args, { target: root, argVals: args }, false);
4097 }
4098 return parser.parseElement("indirectExpression", functionCall);
4099 }
4100 resolve(context, { target, argVals }) {
4101 if (this._isMethodCall) {
4102 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