Best Practice chaining through the language model
Hello forum!
For example I have a language, which looks like these:
object has multiple objects or parameters with deep nestings
In another sandbox I want to reference this objects or parameters like this..
object1.object2.object3.param1
but this could also look like this:
object4.param
So my questions is how do I design my editor aspect for this references and what's the best practice here?
Regards
msch95
Please sign in to leave a comment.
I guess the DotExpression concept in BaseLanguage is very close to what you are looking for.
Vaclav
Thanks! I guess it will also be possible to evaluate sth like this "object1.object2.object3.param1" in the xml generator recursive. So that I can print out <object1></object2><ojbject3><param1/></object3></object2></ojbject1>
Here the link to the tutorial for illustration, if someone stumbles across this question in the future:
https://confluence.jetbrains.com/display/MPSD32/Common+language+patterns#Commonlanguagepatterns-ExtendingtheDotExpressionforyourownreferences