DSL-specific code is code that depends strongly on defining aspects of a particular domain-specific language. It commonly implements the language’s meaning or relies on its structural representation. section 10.2
Typical roles and boundaries include:
- The src/language directory intentionally contains DSL-specific constraints-checking and query functions used by both the frontend and code generator. section 10.2
- Generator code can be specific to the DSL’s meaning, while query functions can be coupled to its structural aspects. section 10.2
- Generated code is strongly coupled to both the DSL content that produced it and the code generator that produced it. section 10.2
- Classifying files alongside DSL-generic AST utilities and DSL-aspecific convenience code exposes architectural boundaries and coupling. section 10.2
Figure 10.9 A chart of coupling between the DSL’s key aspects and the DSL-specific parts of components
Use the coupling chart to compare DSL aspects with the DSL-specific parts of surrounding components. section 10.2
