diff --git a/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java b/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java index 1da80097..ab89d57b 100644 --- a/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java +++ b/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java @@ -277,6 +277,7 @@ public class StatementGenerator { ret.setStatement(); return ret; default: + System.out.println(stmt.getClass()); throw new NotImplementedException(); } } diff --git a/src/main/java/de/dhbwstuttgart/syntaxtree/visual/OutputGenerator.java b/src/main/java/de/dhbwstuttgart/syntaxtree/visual/OutputGenerator.java index b914ecab..26c3dc8c 100644 --- a/src/main/java/de/dhbwstuttgart/syntaxtree/visual/OutputGenerator.java +++ b/src/main/java/de/dhbwstuttgart/syntaxtree/visual/OutputGenerator.java @@ -413,7 +413,8 @@ public class OutputGenerator implements ASTVisitor { } untab(); out.append(tabs); - out.append("}"); + out.append("}::"); + switchStmt.getType().accept(this); } @Override @@ -445,8 +446,10 @@ public class OutputGenerator implements ASTVisitor { @Override public void visit(Yield aYield) { - out.append("yield "); + out.append("yield ("); aYield.retexpr.accept(this); + out.append(")::"); + aYield.getType().accept(this); } @Override