diff --git a/src/de/dhbwstuttgart/core/JavaTXCompiler.java b/src/de/dhbwstuttgart/core/JavaTXCompiler.java index 86666a49..e8d74cb6 100644 --- a/src/de/dhbwstuttgart/core/JavaTXCompiler.java +++ b/src/de/dhbwstuttgart/core/JavaTXCompiler.java @@ -82,7 +82,7 @@ public class JavaTXCompiler { List allClasses = new ArrayList<>();//environment.getAllAvailableClasses(); //Alle Importierten Klassen in allen geparsten Sourcefiles kommen ins FC for(SourceFile sf : this.sourceFiles.values()) { - //allClasses.addAll(getAvailableClasses(sf)); + allClasses.addAll(getAvailableClasses(sf)); allClasses.addAll(sf.getClasses()); } diff --git a/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java b/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java index b6ad9e96..8bbaae0a 100644 --- a/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java +++ b/src/de/dhbwstuttgart/syntaxtree/statement/Literal.java @@ -10,8 +10,11 @@ import org.antlr.v4.runtime.Token; public class Literal extends Expression { + public final Object value; + public Literal(RefTypeOrTPHOrWildcardOrGeneric type, Object value, Token offset) { super(type, offset); + this.value = value; } @Override diff --git a/src/de/dhbwstuttgart/syntaxtree/visual/OutputGenerator.java b/src/de/dhbwstuttgart/syntaxtree/visual/OutputGenerator.java index 7d97d4b7..c7a06502 100644 --- a/src/de/dhbwstuttgart/syntaxtree/visual/OutputGenerator.java +++ b/src/de/dhbwstuttgart/syntaxtree/visual/OutputGenerator.java @@ -360,6 +360,6 @@ public class OutputGenerator implements ASTVisitor{ @Override public void visit(de.dhbwstuttgart.syntaxtree.statement.Literal literal) { - throw new NotImplementedException(); + out.append(literal.value); } } \ No newline at end of file diff --git a/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java b/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java index 423a4f65..a06062c0 100644 --- a/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java +++ b/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java @@ -83,7 +83,7 @@ public class TYPEStmt implements StatementVisitor{ @Override public void visit(BinaryExpr binary) { - throw new NotImplementedException(); + //TODO } @Override @@ -209,7 +209,7 @@ public class TYPEStmt implements StatementVisitor{ @Override public void visit(Literal literal) { - throw new NotImplementedException(); + //Nothing to do here. Literale kriegen beim parsen den korrekten Typ. } @Override