DSL-generic code provides part of a reusable implementation framework for a domain-specific language without depending on the language’s key aspects. It remains distinct from DSL-specific code and from DSL-aspecific boilerplate. section 10.2
Its role becomes clearer through its shared implementation boundaries:
- Supports DSL components while avoiding coupling to particular DSL concepts. section 10.2
- Often depends on the generic low-level AST structure: plain JavaScript objects for AST objects and reference relations. section 10.2
- Includes React component functions used by a DSL projection and shared functions in src/common/ast.js. section 10.2
- Helps isolate DSL-specific implementation when assessing change impact and planning tests. section 10.2
Figure 10.4 Categorizing code into three kinds, and illustrating their coupling (with arrows) to the generic low-level AST structure
Use the coupling diagram to distinguish DSL-generic code from DSL-specific and DSL-aspecific code around the shared AST structure. section 10.2
