TypeInsert ausbessern
This commit is contained in:
parent
397ac3cd58
commit
ff59b585bd
@ -63,7 +63,8 @@ public abstract class AbstractASTWalker implements ASTVisitor{
|
||||
private void visitMethod(Method method){
|
||||
method.getType().accept(this);
|
||||
method.getParameterList().accept(this);
|
||||
method.block.accept(this);
|
||||
if(method.block != null)
|
||||
method.block.accept(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -84,7 +84,8 @@ public class OutputGenerator implements ASTVisitor {
|
||||
method.getType().accept(this);
|
||||
out.append(" " + method.getName());
|
||||
method.getParameterList().accept(this);
|
||||
method.block.accept(this);
|
||||
if(method.block != null)
|
||||
method.block.accept(this);
|
||||
out.append("\n");
|
||||
}
|
||||
|
||||
|
@ -62,6 +62,8 @@ public class TypeInsertFactory {
|
||||
additionalInserts.add(((TypePlaceholder) type));
|
||||
}else if(type instanceof GenericRefType){
|
||||
insertPoint = new TypeInsertPoint(offset, ((GenericRefType) type).getName().toString());
|
||||
}else if(type instanceof RefType){
|
||||
insertPoint = new TypeInsertPoint(offset, ((RefType) type).getName().toString());
|
||||
}else throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
@ -33,15 +33,15 @@ public class JavaTXCompilerTest extends JavaTXCompiler {
|
||||
|
||||
@Test
|
||||
public void test() throws IOException, java.lang.ClassNotFoundException {
|
||||
//filesToTest.add(new File(rootDirectory+"Faculty.jav"));
|
||||
filesToTest.add(new File(rootDirectory+"Faculty.jav"));
|
||||
filesToTest.add(new File(rootDirectory+"mathStruc.jav"));
|
||||
//filesToTest.add(new File(rootDirectory+"Lambda.jav"));
|
||||
//filesToTest.add(new File(rootDirectory+"Lambda2.jav"));
|
||||
//filesToTest.add(new File(rootDirectory+"Lambda3.jav"));
|
||||
//filesToTest.add(new File(rootDirectory+"Vector.jav"));
|
||||
//filesToTest.add(new File(rootDirectory+"Generics.jav"));
|
||||
//filesToTest.add(new File(rootDirectory+"MethodsEasy.jav"));
|
||||
//filesToTest.add(new File(rootDirectory+"Matrix.jav"));
|
||||
filesToTest.add(new File(rootDirectory+"Lambda.jav"));
|
||||
filesToTest.add(new File(rootDirectory+"Lambda2.jav"));
|
||||
filesToTest.add(new File(rootDirectory+"Lambda3.jav"));
|
||||
filesToTest.add(new File(rootDirectory+"Vector.jav"));
|
||||
filesToTest.add(new File(rootDirectory+"Generics.jav"));
|
||||
filesToTest.add(new File(rootDirectory+"MethodsEasy.jav"));
|
||||
filesToTest.add(new File(rootDirectory+"Matrix.jav"));
|
||||
for(File f : filesToTest){
|
||||
SourceFile sf = this.parse(f);
|
||||
System.out.println(ASTTypePrinter.print(this.sourceFiles.get(sourceFiles.size()-1)));
|
||||
|
Loading…
Reference in New Issue
Block a user