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

Method addFeature

www/js/_hyperscript.esm.js:1586–1590  ·  view source on GitHub ↗
(keyword, definition)

Source from the content-addressed store, hash-verified

1584 }
1585 }
1586 addFeature(keyword, definition) {
1587 var featureGrammarType = keyword + "Feature";
1588 this.#grammar[featureGrammarType] = definition;
1589 this.#features[keyword] = definition;
1590 }
1591 /**
1592 * Register a parse element class based on its static metadata.
1593 * Commands need `static keyword`, expressions need `static grammarName`.

Callers 2

addFeaturesMethod · 0.45
registerParseElementMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected