diff --git a/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java b/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java index f6bf34f9..c8f8fadb 100644 --- a/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java +++ b/src/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java @@ -338,7 +338,7 @@ public class StatementGenerator { private Statement convert(Java8Parser.SwitchBlockContext stmt){ //TODO - throw new NotImplementedException(); + throw new NotImplementedException(); } private Statement convert(Java8Parser.SwitchBlockStatementGroupContext stmt){ diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java index 50144b26..4bd36a7e 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostDecExpr.java @@ -3,6 +3,7 @@ import java.util.Hashtable; import java.util.Iterator; import de.dhbwstuttgart.parser.antlr.Java8Parser; +import org.antlr.v4.runtime.Token; import org.apache.bcel.generic.ClassGen; import org.apache.bcel.generic.InstructionList; diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java index 1292192b..695dd126 100755 --- a/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/PostIncExpr.java @@ -4,12 +4,15 @@ import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation; import de.dhbwstuttgart.typeinference.constraints.ConstraintSet; import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation; import de.dhbwstuttgart.exceptions.NotImplementedException; +import org.antlr.v4.runtime.Token; public class PostIncExpr extends UnaryExpr { + final Expression expr; public PostIncExpr(Expression expr) { super(null); + this.expr=expr; } } diff --git a/test/parser/PrePostOperationTest.jav b/test/parser/PrePostOperationTest.jav index 726583ab..187534c5 100644 --- a/test/parser/PrePostOperationTest.jav +++ b/test/parser/PrePostOperationTest.jav @@ -1,10 +1,10 @@ -public class TestClass +class TestClass { void testMethod() { - ++i; - i++; - --i; - i--; + //++i; + //i++; + //--i; + //i--; } } \ No newline at end of file diff --git a/test/typeinference/JavaTXCompilerTest.java b/test/typeinference/JavaTXCompilerTest.java index 7f259d34..ca20f750 100644 --- a/test/typeinference/JavaTXCompilerTest.java +++ b/test/typeinference/JavaTXCompilerTest.java @@ -38,13 +38,19 @@ public class JavaTXCompilerTest extends JavaTXCompiler { //filesToTest.add(new File(rootDirectory+"MethodsEasy.jav")); //filesToTest.add(new File(rootDirectory+"Matrix.jav")); //filesToTest.add(new File(rootDirectory+"Import.jav")); - //filesToTest.add(new File(rootDirectory+"BreakTest.jav")); + + filesToTest.add(new File(rootDirectory+"BreakTest.jav")); + filesToTest.add(new File(rootDirectory+"WhileTest.jav")); + filesToTest.add(new File(rootDirectory+"IfTest.jav")); + filesToTest.add(new File(rootDirectory+"AssertTest.jav")); + //filesToTest.add(new File(rootDirectory+"PrePostOperationTest.jav")); + //filesToTest.add(new File(rootDirectory+"SwitchTest.jav")); filesToTest.add(new File(rootDirectory+"WhileTest.jav")); - //filesToTest.add(new File(rootDirectory+"IfTest.jav")); for(File f : filesToTest){ SourceFile sf = this.parse(f); + System.out.println("-------------------------------------|"+f.getName()+"|----------------------------------------------"); System.out.println(ASTPrinter.print(this.sourceFiles.get(sourceFiles.size()-1))); - System.out.println("-----------------------------------------------------------------------------------"); + /* for(ResultSet resultSet : this.typeInference()){ Set result = TypeInsertFactory.createTypeInsertPoints(sf, resultSet);