MPS
 
Get MPS
You are viewing the documentation for an earlier version of MPS.

Concept Functions

Last modified: 23 March 2021

Concept functions allow language designers to leave hooks for their language users, through which the users can provide code to leverage in the generated code. For example, most of the languages that MPS offers for language design, such as EditorConstraints or Intentions, leverage Concept functions:

Cf1

You can also discover their usages down in the Inspector window:

Cf2

Concept functions are defined in jetbrains.mps.baselanguage and they contain BaseLanguage code, which upon generation becomes part of the generated Java code. This option can give your DSLs enormous flexibility.