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

Method parse

src/parsetree/commands/basic.js:46–56  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

44 }
45
46 static parse(parser) {
47 if (!parser.matchToken("log")) return;
48 var exprs = [parser.parseElement("expression")];
49 while (parser.matchOpToken(",")) {
50 exprs.push(parser.requireElement("expression"));
51 }
52 if (parser.matchToken("with")) {
53 var withExpr = parser.requireElement("expression");
54 }
55 return new LogCommand(exprs, withExpr);
56 }
57
58 resolve(ctx, { logger, values }) {
59 if (logger) {

Callers

nothing calls this directly

Calls 4

matchTokenMethod · 0.45
parseElementMethod · 0.45
matchOpTokenMethod · 0.45
requireElementMethod · 0.45

Tested by

no test coverage detected