When to use XExpression, XblockExpression and just plain parser rule [message #1736257] |
Mon, 27 June 2016 22:57  |
Eclipse User |
|
|
|
I have been prototyping and playing with xText/Xbase for few weeks. I am still lost as there are many components in the system that I have not seen.
Now, I would to understand when to use an XExpression, and when not use it. And if I need an expression, why not use XBlockExpression.
So what factors others use to decide if they need to use an expression or not.
|
|
|
Re: When to use XExpression, XblockExpression and just plain parser rule [message #1736267 is a reply to message #1736257] |
Tue, 28 June 2016 07:01   |
Eclipse User |
|
|
|
Usually DSLs won't make any restriction on the kind of expression they allow at a certain position, so XExpression is often right. But if you would like to force that an expression has to be encapsulated in curly brackets, you go with XBlockExpression. For example, if you would like something like an Operation which has a Body, as seen in the Domainmodel example.
As always, it depends...
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02726 seconds