Can i provide some predefine consept instances with my language?

Let's say i define a concept called Conversion with SourceType and TargetType properties,

which is being used as a type of properties in yet more complex concepts.

Now, i want to define some very common Conversion consepts, like IntToDouble or IntToString Conversion,

that will be available for my language users, can i do that?

Please, don't relate to the meaning of conversion because this is just an example...

Thanks, Ohad.

2 comments
Comment actions Permalink

Hello, Ohad,

You can create an accessory model for your language and define concept instances there. This way they will be available for users of the language.

As an example you can look at regular expression language, distributed with MPS, which defines some symbol classes in an accessory model jetbrains.mps.baseLanguage.regexp.jetbrains.mps.regexp.accessory.

Regards,

Julia

0
Comment actions Permalink

Gee Thanks, you're fast!!! I will try that!!!

0

Please sign in to leave a comment.