Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Xtend function definition syntax
Xtend function definition syntax [message #758666] Thu, 24 November 2011 02:42 Go to next message
Eclipse UserFriend
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 02:44] by Moderator

Re: Xtend function definition syntax [message #758669 is a reply to message #758666] Thu, 24 November 2011 02:50 Go to previous messageGo to next message
Eclipse UserFriend
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 05:43 Go to previous message
Eclipse UserFriend
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: Wed Jul 02 18:11:39 EDT 2025

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

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

Back to the top