groovy-dev mailing list archives

Hi all,
The new parser Parrot support array initializer of Java style, e.g.
new int[] {1, 2, 3}, new int[][]{new int[]{1, 1.plus(1)}, new int[]
{2.plus(1), 4}}, new String[] {'hello', 'world'}
More examples can be found at
https://github.com/danielsun1106/groovy-parser/blob/master/src/test/resources/core/Array_01x.groovy
If you want to give it a try, follow the steps to launch groovy
console to run your code:
$ git clone https://github.com/danielsun1106/groovy-parser.git
$ cd groovy-parser
$ ./gradlew groovyConsole
Cheers,
Daniel.Sun
--
View this message in context: http://groovy.329449.n5.nabble.com/Array-initializer-of-Java-style-for-Groovy-3-tp5737955.html
Sent from the Groovy Dev mailing list archive at Nabble.com.