Can I inherit from other langauges?
I would like to create a new language by extending another language (for
example, let's say I want to extend the base-language with a construct
called "property" that would generate a field, a get and a set-method).
How would I go about doing that? It would be convenient to just be able
to choose a language to inherit from when I do a "New Language". I would
then inherit the whole structure and all editors, and be able to add new
structure and editor nodes for my extra constructs.
-Karl
Please sign in to leave a comment.
Karl Avedal wrote:
You can extends concepts from another language. And everything will work
correctly. But in models you have to add both languages in language dialog.
For example in MPS jetbrains.mps.bootstrap.editorLanguage uses concepts
from jetbrains.mps.baseLanguage. Collection language extends baseLanguage.
Konstantin Solomatov wrote:
Thanks for the fast reply! I see how it works.
-Karl
hi, you will find inheritance in the "agreement" demo where agreementLanguage inherits (includes, extends ?) from formulaLanguge.