forked from JavaTX/JavaCompilerCore
ANTLR Test angepasst
This commit is contained in:
parent
250b98d679
commit
199278ac8b
@ -29,9 +29,9 @@ class EvalVisitor extends Java8BaseVisitor<SyntaxTreeNode> {
|
||||
|
||||
@Override
|
||||
public SyntaxTreeNode visitCompilationUnit(CompilationUnitContext ctx) {
|
||||
Vector<SyntaxTreeNode> classDefinitions = new Vector<>();
|
||||
Vector<Class> 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<SyntaxTreeNode> {
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user