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

Method parse

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

Source from the content-addressed store, hash-verified

6202 this.args = { targetValue: target, amount: amountExpr, ...target.lhs };
6203 }
6204 static parse(parser) {
6205 if (!parser.matchToken("decrement")) return;
6206 var amountExpr;
6207 try {
6208 parser.pushFollow("by");
6209 var target = parser.parseElement("assignableExpression");
6210 } finally {
6211 parser.popFollow();
6212 }
6213 while (target.type === "parenthesized") target = target.expr;
6214 if (parser.matchToken("by")) {
6215 amountExpr = parser.requireElement("expression");
6216 }
6217 return new _DecrementCommand(target, amountExpr);
6218 }
6219 resolve(context, args) {
6220 var { targetValue, amount, ...lhs } = args;
6221 targetValue = targetValue ? parseFloat(targetValue) : 0;

Callers

nothing calls this directly

Calls 5

matchTokenMethod · 0.45
pushFollowMethod · 0.45
parseElementMethod · 0.45
popFollowMethod · 0.45
requireElementMethod · 0.45

Tested by

no test coverage detected