diff --git a/src/de/dhbwstuttgart/antlr/Test.java b/src/de/dhbwstuttgart/antlr/Test.java index bb1e08eda..712954408 100644 --- a/src/de/dhbwstuttgart/antlr/Test.java +++ b/src/de/dhbwstuttgart/antlr/Test.java @@ -29,9 +29,9 @@ class EvalVisitor extends Java8BaseVisitor { @Override public SyntaxTreeNode visitCompilationUnit(CompilationUnitContext ctx) { - Vector classDefinitions = new Vector<>(); + Vector classDefinitions = new Vector<>(); for(TypeDeclarationContext tDecl : ctx.typeDeclaration()){ - SyntaxTreeNode cl = visit(tDecl); + Class cl = (Class) visit(tDecl); classDefinitions.add(cl); } @@ -39,15 +39,14 @@ class EvalVisitor extends Java8BaseVisitor { } @Override - public SyntaxTreeNode visitTypeDeclaration(TypeDeclarationContext ctx) { - // TODO Auto-generated method stub - return super.visitTypeDeclaration(ctx); + public Class visitTypeDeclaration(TypeDeclarationContext ctx) { + Class ret = (Class) visit(ctx.classDeclaration()); + return ret; } @Override - public SyntaxTreeNode visitClassDeclaration(ClassDeclarationContext ctx) { - // TODO Auto-generated method stub - return super.visitClassDeclaration(ctx); + public Class visitClassDeclaration(ClassDeclarationContext ctx) { + return null; } }