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

Method parse

tools/common/_hyperscript.iife.js:6144–6159  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

6142 this.args = { targetValue: target };
6143 }
6144 static parse(parser) {
6145 if (!parser.matchToken("default")) return;
6146 try {
6147 parser.pushFollow("to");
6148 var target = parser.requireElement("assignableExpression");
6149 } finally {
6150 parser.popFollow();
6151 }
6152 while (target.type === "parenthesized") target = target.expr;
6153 parser.requireToken("to");
6154 var value = parser.requireElement("expression");
6155 var setter = new SetCommand(target, value);
6156 var defaultCmd = new _DefaultCommand(target, setter);
6157 setter.parent = defaultCmd;
6158 return defaultCmd;
6159 }
6160 resolve(context, { targetValue }) {
6161 if (targetValue != null && targetValue !== "") {
6162 return this.findNext(context);

Callers

nothing calls this directly

Calls 5

matchTokenMethod · 0.45
pushFollowMethod · 0.45
requireElementMethod · 0.45
popFollowMethod · 0.45
requireTokenMethod · 0.45

Tested by

no test coverage detected