Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtend function definition syntax
Xtend function definition syntax [message #758666] Thu, 24 November 2011 07:42 Go to next message
Nikolai Busse is currently offline Nikolai BusseFriend
Messages: 15
Registered: August 2011
Junior Member
In the Xtext 2.0/2.1 Documentation, chapter 12.2.5/13.2.5 about Functions, there is the example function definition in old Xtend 1.0 style
def boolean equalsIgnoreCase(String s1, String s2) :
s1.toLowerCase() == s2.toLowerCase();

But this example is not accepted by the Xtend parser, it complains
Quote:
mismatched input ':' expecting '}'

Clearly, the syntax
def boolean equalsIgnoreCase(String s1, String s2) 
{ s1.toLowerCase() == s2.toLowerCase() }

works fine. Maybe the documentation should be adjusted, or did I overlook something?

[Updated on: Thu, 24 November 2011 07:44]

Report message to a moderator

Re: Xtend function definition syntax [message #758669 is a reply to message #758666] Thu, 24 November 2011 07:50 Go to previous messageGo to next message
Meinte Boersma is currently offline Meinte BoersmaFriend
Messages: 434
Registered: July 2009
Location: Leiden, Netherlands
Senior Member
Documentation must be off: would you kindly file a bugzilla for this?

Re: Xtend function definition syntax [message #758933 is a reply to message #758669] Fri, 25 November 2011 10:43 Go to previous message
Nikolai Busse is currently offline Nikolai BusseFriend
Messages: 15
Registered: August 2011
Junior Member
Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=364811 Submitted
Previous Topic:Plugin Deployment Problem
Next Topic:testing with ValidationTestHelper
Goto Forum:
  


Current Time: Sat Apr 20 03:07:37 GMT 2024

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

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

Back to the top