Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[epsilon-dev] Epsilon lambdas and ANTLR 3.2

Hi all,

 

In the “lambda-support” branch, I have fixed Bug 464793 [1] by changing the manifest of org.eclipse.epsilon.dependencies to depend on org.antlr.runtime version 3.2.0.

 

Furthermore, I have also added capabilities to use first-order operation call _expression_ syntax to invoke functional interfaces on native types. Examples of this can be found in org.eclipse.epsilon.eol.engine.test.acceptance.firstOrder.lambda.LambdaExpressionTest.eol, which demonstrates the use Functions, Predicates, BiFunctions, Suppliers and Consumers.

I managed to get around modifying the EOL grammar to support Suppliers by using the underscore to signify a non-parameter. This will only affect lambda expressions on native types, not existing first-order operation expressions.

 

For anyone interested in the implementation, please see org.eclipse.epsilon.eol.execute.operations.DynamicOperation and org.eclipse.epsilon.eol.dom.FeatureCallExpression#getAbstractOperation.

 

If there are no objections or suggestions, I propose to merge these changes into the main branch and also document this on the website and/or Epsilon book.

 

Thanks,

Sina

 

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=464793

 


Back to the top