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

Method parse

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

Source from the content-addressed store, hash-verified

8839 this.args = { from, to, using: usingExpr, over };
8840 }
8841 static parse(parser) {
8842 if (!parser.matchToken("transition")) return;
8843 var propExprs = [];
8844 var from = [];
8845 var to = [];
8846 do {
8847 var follows = parser.pushFollows("from", "to");
8848 try {
8849 propExprs.push(parser.requireElement("expression"));
8850 } finally {
8851 parser.popFollows(follows);
8852 }
8853 from.push(parser.matchToken("from") ? parser.requireElement("expression") : null);
8854 parser.requireToken("to");
8855 to.push(parser.matchToken("initial") ? "initial" : parser.requireElement("expression"));
8856 } while (!parser.commandBoundary(parser.currentToken()) && parser.currentToken().value !== "over" && parser.currentToken().value !== "using");
8857 var over, usingExpr;
8858 if (parser.matchToken("over")) {
8859 over = parser.requireElement("expression");
8860 } else if (parser.matchToken("using")) {
8861 usingExpr = parser.requireElement("expression");
8862 }
8863 return new _TransitionCommand(propExprs, from, to, usingExpr, over);
8864 }
8865 resolve(context, { from, to, using, over }) {
8866 var cmd = this;
8867 var runtime2 = context.meta.runtime;

Callers

nothing calls this directly

Calls 7

matchTokenMethod · 0.45
pushFollowsMethod · 0.45
requireElementMethod · 0.45
popFollowsMethod · 0.45
requireTokenMethod · 0.45
commandBoundaryMethod · 0.45
currentTokenMethod · 0.45

Tested by

no test coverage detected