groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Sun <realblue...@hotmail.com>
Subject Standard "for" loop statement for Groovy 3
Date Sat, 28 Jan 2017 13:57:16 GMT
Hi all,

      The new parser Parrot supports standard "for" loop
statement(conforming to JLS) now, e.g.
1) for (int i = 0, n = 10; i < n; i++) {..}
2) for(int i = 0, j = 10; i < j; i++, j--) {..}

       More examples:
1)
https://github.com/danielsun1106/groovy-parser/blob/master/src/test/resources/core/For_04x.groovy
2)
https://github.com/danielsun1106/groovy-parser/blob/master/src/test/resources/core/For_05x.groovy

PS: I've studied and used Groovy since the end of 2006, the standard "for"
loop statement has been the feature I mostly wanted. I'm really glad to
introduce it into the Groovy 3 :)

Cheers,
Daniel.Sun



--
View this message in context: http://groovy.329449.n5.nabble.com/Standard-for-loop-statement-for-Groovy-3-tp5738199.html
Sent from the Groovy Dev mailing list archive at Nabble.com.

Mime
View raw message