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

Method parse

www/js/_hyperscript-max.js:9866–9880  ·  view source on GitHub ↗

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

(parser)

Source from the content-addressed store, hash-verified

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