* Register all exported parse element classes from a module. * Iterates over module exports and registers any class with * a static `parse` method and appropriate metadata.
(module)
| 1637 | * a static `parse` method and appropriate metadata. |
| 1638 | */ |
| 1639 | registerModule(module) { |
| 1640 | for (const exported of Object.values(module)) { |
| 1641 | if (typeof exported === "function" && exported.parse) { |
| 1642 | this.registerParseElement(exported); |
| 1643 | } |
| 1644 | } |
| 1645 | } |
| 1646 | addLeafExpression(name, definition) { |
| 1647 | this.#leafExpressions.push(name); |
| 1648 | this.addGrammarElement(name, definition); |
no test coverage detected