diff --git a/src/de/dhbwstuttgart/parser/CompilationUnitEvaluator.java b/src/de/dhbwstuttgart/parser/CompilationUnitEvaluator.java index 9260bccf..fa1b7d1d 100644 --- a/src/de/dhbwstuttgart/parser/CompilationUnitEvaluator.java +++ b/src/de/dhbwstuttgart/parser/CompilationUnitEvaluator.java @@ -4,12 +4,21 @@ import de.dhbwstuttgart.syntaxtree.*; public class CompilationUnitEvaluator extends Java8BaseListener{ @Override public void enterCompilationUnit(Java8Parser.CompilationUnitContext ctx) { - System.out.println("Entering compilationUnit..."); + System.out.println("SourceFile("); } @Override public void exitCompilationUnit(Java8Parser.CompilationUnitContext ctx) { - System.out.println("sourceFile("); - System.out.println(ctx.packageDeclaration().Identifier()); + System.out.println(")"); + } + + @Override + public void enterPackageDeclaration(Java8Parser.PackageDeclarationContext ctx) { + System.out.println("package("); + } + + @Override + public void exitPackageDeclaration(Java8Parser.PackageDeclarationContext ctx) { + System.out.println(ctx.Identifier()); System.out.println(")"); } }