Re: forbit brackets in my xbase expression

38 views
Skip to first unread message

Sven Efftinge (sven@efftinge.de)

unread,
Apr 7, 2016, 2:29:38 AM4/7/16
to xtend...@googlegroups.com
Hi Michael,

(it is better to ask this kind of question on the Xtext forum [1])

The parenthesis are not part of the AST, but you can look at the parse tree (aka "node model").
Checkout NodeModelUtil to get the parse tree nodes for an XExpression.

Sven



2016-04-06 17:10 GMT+02:00 Michael Budnick <mic...@budnick.de>:
Hello,

in my DSL I use the xbase XExpressions.
Under some conditions this expression should not allow brackets to change the order of operations.
So I will implement a @Check in my Validator-class.

How can I find out if a expression contains brackets?
I see the leftOperand and rightOperand but not if this operand is surrounded with brackets.

Thanks and Regards,
Michael

--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Budnick

unread,
Apr 9, 2016, 2:45:34 PM4/9/16
to Xtend Programming Language
Yes, as I notice that I posted to the wrong group I deleted this post.

Solved post in the xtext-group:
https://www.eclipse.org/forums/index.php/t/1076328/
Reply all
Reply to author
Forward
0 new messages