* 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)
| 1639 | * a static `parse` method and appropriate metadata. |
| 1640 | */ |
| 1641 | registerModule(module) { |
| 1642 | for (const exported of Object.values(module)) { |
| 1643 | if (typeof exported === "function" && exported.parse) { |
| 1644 | this.registerParseElement(exported); |
| 1645 | } |
| 1646 | } |
| 1647 | } |
| 1648 | addLeafExpression(name, definition) { |
| 1649 | this.#leafExpressions.push(name); |
| 1650 | this.addGrammarElement(name, definition); |
no test coverage detected