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

Method parse

www/js/_hyperscript.js:6563–6577  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

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