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

Method addGrammarElement

src/core/kernel.js:258–263  ·  view source on GitHub ↗
(name, definition)

Source from the content-addressed store, hash-verified

256 }
257
258 addGrammarElement(name, definition) {
259 if (this.#grammar[name]) {
260 throw new Error(`Grammar element '${name}' already exists`);
261 }
262 this.#grammar[name] = definition;
263 }
264
265 addCommand(keyword, definition) {
266 var commandGrammarType = keyword + "Command";

Callers 7

constructorMethod · 0.95
registerParseElementMethod · 0.95
addLeafExpressionMethod · 0.95
addIndirectExpressionMethod · 0.95
addPostfixExpressionMethod · 0.95
addUnaryExpressionMethod · 0.95
addTopExpressionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected