Funktionsfähiges Matrix Beispiel, aber nicht komplett

This commit is contained in:
JanUlrich 2018-01-31 15:51:38 +01:00
parent e556a470e7
commit 15d120d594
4 changed files with 7 additions and 4 deletions

View File

@ -82,7 +82,7 @@ public class JavaTXCompiler {
List<ClassOrInterface> 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());
}

View File

@ -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

View File

@ -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);
}
}

View File

@ -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