forked from JavaTX/JavaCompilerCore
Funktionsfähiges Matrix Beispiel, aber nicht komplett
This commit is contained in:
parent
e556a470e7
commit
15d120d594
@ -82,7 +82,7 @@ public class JavaTXCompiler {
|
|||||||
List<ClassOrInterface> allClasses = new ArrayList<>();//environment.getAllAvailableClasses();
|
List<ClassOrInterface> allClasses = new ArrayList<>();//environment.getAllAvailableClasses();
|
||||||
//Alle Importierten Klassen in allen geparsten Sourcefiles kommen ins FC
|
//Alle Importierten Klassen in allen geparsten Sourcefiles kommen ins FC
|
||||||
for(SourceFile sf : this.sourceFiles.values()) {
|
for(SourceFile sf : this.sourceFiles.values()) {
|
||||||
//allClasses.addAll(getAvailableClasses(sf));
|
allClasses.addAll(getAvailableClasses(sf));
|
||||||
allClasses.addAll(sf.getClasses());
|
allClasses.addAll(sf.getClasses());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,8 +10,11 @@ import org.antlr.v4.runtime.Token;
|
|||||||
|
|
||||||
public class Literal extends Expression
|
public class Literal extends Expression
|
||||||
{
|
{
|
||||||
|
public final Object value;
|
||||||
|
|
||||||
public Literal(RefTypeOrTPHOrWildcardOrGeneric type, Object value, Token offset) {
|
public Literal(RefTypeOrTPHOrWildcardOrGeneric type, Object value, Token offset) {
|
||||||
super(type, offset);
|
super(type, offset);
|
||||||
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -360,6 +360,6 @@ public class OutputGenerator implements ASTVisitor{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visit(de.dhbwstuttgart.syntaxtree.statement.Literal literal) {
|
public void visit(de.dhbwstuttgart.syntaxtree.statement.Literal literal) {
|
||||||
throw new NotImplementedException();
|
out.append(literal.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -83,7 +83,7 @@ public class TYPEStmt implements StatementVisitor{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visit(BinaryExpr binary) {
|
public void visit(BinaryExpr binary) {
|
||||||
throw new NotImplementedException();
|
//TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -209,7 +209,7 @@ public class TYPEStmt implements StatementVisitor{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visit(Literal literal) {
|
public void visit(Literal literal) {
|
||||||
throw new NotImplementedException();
|
//Nothing to do here. Literale kriegen beim parsen den korrekten Typ.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user