groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Sun <realblue...@hotmail.com>
Subject One more new operator "implies" ( => ) for Groovy 3
Date Thu, 26 Jan 2017 09:07:59 GMT
Hi all,

     The new parser Parrot supports "implies" operator( => )  now, e.g.

if (itIsRaining => iAmUsingUmbrella) {
  println 'I am dry'
}

       More examples can be found at:
1)
https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_01x.groovy
2)
https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_02x.groovy
3)
https://github.com/danielsun1106/groovy-parser/blob/impliesOperator/src/test/resources/core/ImpliesOp_03x.groovy

       Any thoughts? If most of us like it, I'll merge the new feature to
parrot branch of apache/groovy and resolve  GROOVY-2576
<https://issues.apache.org/jira/browse/GROOVY-2576>  

Cheers,
Daniel.Sun




--
View this message in context: http://groovy.329449.n5.nabble.com/One-more-new-operator-implies-for-Groovy-3-tp5738103.html
Sent from the Groovy Dev mailing list archive at Nabble.com.

Mime
View raw message