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

Method parse

www/js/_hyperscript-max.js:6562–6576  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

6560 this.args = { targetValue: target, amount: amountExpr, ...target.lhs };
6561 }
6562 static parse(parser) {
6563 if (!parser.matchToken("decrement")) return;
6564 var amountExpr;
6565 try {
6566 parser.pushFollow("by");
6567 var target = parser.parseElement("assignableExpression");
6568 } finally {
6569 parser.popFollow();
6570 }
6571 while (target.type === "parenthesized") target = target.expr;
6572 if (parser.matchToken("by")) {
6573 amountExpr = parser.requireElement("expression");
6574 }
6575 return new _DecrementCommand(target, amountExpr);
6576 }
6577 resolve(context, args) {
6578 var { targetValue, amount, ...lhs } = args;
6579 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