Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 16:47 Go to next message
Nitish Kumar is currently offline Nitish KumarFriend
Messages: 1
Registered: April 2021
Junior Member
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 20:56 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4087
Registered: July 2009
Senior Member

I think Xtend has their user discussions at https://groups.google.com/g/xtend-lang?pli=1 .

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Generate xtend file for variable declarations [message #1840120 is a reply to message #1840104] Wed, 07 April 2021 05:44 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31959
Registered: July 2009
Senior Member
Probably the TMF (Xtext) forum is the best place to ask:

https://www.eclipse.org/forums/index.php/f/27/


Ed Merks
Professional Support: https://www.macromodeling.com/
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: Thu Jul 29 03:57:23 GMT 2021

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

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

Back to the top