Skip to main content



      Home
Home » Newcomers » Newcomers » Generate xtend file for variable declarations(Generate xtend file for variable declarations)
Generate xtend file for variable declarations [message #1840096] Tue, 06 April 2021 12:47 Go to next message
Eclipse UserFriend
My rules are as below

integer: 'int' name=ID '=' exp=IntExpression;
IntExpression:
int=INT |
ref=[integer];

Generator is as below:

case integerImpl:

"int "+(e as integerImpl).name+" = " +

if( (((e as integerImpl).exp as IntExpressionImpl).int.intValue>0) )
{
integerImpl.
((e as integerImpl).exp as IntExpressionImpl ).int
}
else
{
((e as integerImpl).exp as IntExpressionImpl ).value

}
The generator is not returning desired output.
My use case is
int x=10;
int y=x;
Re: Generate xtend file for variable declarations [message #1840104 is a reply to message #1840096] Tue, 06 April 2021 16:56 Go to previous messageGo to next message
Eclipse UserFriend
I think Xtend has their user discussions at https://groups.google.com/g/xtend-lang?pli=1 .
Re: Generate xtend file for variable declarations [message #1840120 is a reply to message #1840104] Wed, 07 April 2021 01:44 Go to previous message
Eclipse UserFriend
Probably the TMF (Xtext) forum is the best place to ask:

https://www.eclipse.org/forums/index.php/f/27/
Previous Topic:xml editor and tools 3.21 install
Next Topic:IM NOT ABLE INSTALL Eclipse IDE for Enterprise Java and Web Developers
Goto Forum:
  


Current Time: Sun Jul 13 00:40:15 EDT 2025

Powered by FUDForum. Page generated in 0.09186 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top