- changed component to ast api
Add Java 8 stream support to ASTNode
Issue #264
new
The Java 8 stream API allows functional style programming with Java collections. For example:
List<String> names = myElements.stream().map(element -> element.getName()).collect(Collectors.toList());
It would be very useful if AST nodes could be used similarly. We already have a astChildren()
method which returns an Iterable
view of the children of an ASTNode, but to use the stream API we would need a new method returning a stream.
Since the stream API is only available in Java 8 we would need an option to enable this feature to still support generating Java 6 code as the default.
Comments (1)
-
reporter - Log in to comment