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

Method parse

www/js/_hyperscript.esm.js:9865–9879  ·  view source on GitHub ↗

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

(parser)

Source from the content-addressed store, hash-verified

9863 * @returns {BindFeature | undefined}
9864 */
9865 static parse(parser) {
9866 if (!parser.matchToken("bind")) return;
9867 var follows = parser.pushFollows("and", "with", "to");
9868 var left;
9869 try {
9870 left = parser.requireElement("expression");
9871 } finally {
9872 parser.popFollows(follows);
9873 }
9874 if (!parser.matchToken("and") && !parser.matchToken("with") && !parser.matchToken("to")) {
9875 parser.raiseExpected("and", "with", "to");
9876 }
9877 var right = parser.requireElement("expression");
9878 return new _BindFeature(left, right);
9879 }
9880 constructor(left, right) {
9881 super();
9882 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