src/share/classes/com/sun/tools/javac/tree/Pretty.java
Print this page
*** 1221,1230 ****
--- 1221,1261 ----
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
+ public void visitFunctionType(JCFunctionType tree) {
+ try {
+ print("#");
+ printExpr(tree.returnType);
+ print("(");
+ printExprs(tree.parameterTypes);
+ print(")");
+ } catch (IOException e) {
+ throw new UncheckedIOException(e);
+ }
+ }
+
+ public void visitLambda(JCLambda tree) {
+ try {
+ print("lambda(");
+ printExprs(tree.parameters);
+ print(")");
+
+ if (tree.bodyOrExpr instanceof JCBlock) {
+ print(" ");
+ printStat(tree.bodyOrExpr);
+ } else {
+ print(" (");
+ printExpr(tree.bodyOrExpr);
+ print(")");
+ }
+ } catch (IOException e) {
+ throw new UncheckedIOException(e);
+ }
+ }
+
public void visitErroneous(JCErroneous tree) {
try {
print("(ERROR)");
} catch (IOException e) {
throw new UncheckedIOException(e);