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

Method parse

tools/common/_hyperscript.iife.js:9413–9427  ·  view source on GitHub ↗

* Parse bind feature * @param {Parser} parser * @returns {BindFeature | undefined}

(parser)

Source from the content-addressed store, hash-verified

9411 * @returns {BindFeature | undefined}
9412 */
9413 static parse(parser) {
9414 if (!parser.matchToken("bind")) return;
9415 var follows = parser.pushFollows("and", "with", "to");
9416 var left;
9417 try {
9418 left = parser.requireElement("expression");
9419 } finally {
9420 parser.popFollows(follows);
9421 }
9422 if (!parser.matchToken("and") && !parser.matchToken("with") && !parser.matchToken("to")) {
9423 parser.raiseExpected("and", "with", "to");
9424 }
9425 var right = parser.requireElement("expression");
9426 return new _BindFeature(left, right);
9427 }
9428 constructor(left, right) {
9429 super();
9430 this.left = left;

Callers

nothing calls this directly

Calls 5

matchTokenMethod · 0.45
pushFollowsMethod · 0.45
requireElementMethod · 0.45
popFollowsMethod · 0.45
raiseExpectedMethod · 0.45

Tested by

no test coverage detected