Constructor für IfStmt

This commit is contained in:
JanUlrich 2017-09-18 13:56:27 +02:00
parent 98331af3c0
commit 201a0978bc
3 changed files with 16 additions and 10 deletions

View File

@ -1,22 +1,27 @@
package de.dhbwstuttgart.syntaxtree.statement;
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
import org.antlr.v4.runtime.Token;
public class IfStmt extends Statement
{
public IfStmt(int offset, int variableLength)
public final Expression expr;
public final Block then_block;
public final Block else_block;
public IfStmt(RefTypeOrTPHOrWildcardOrGeneric type,
Expression expr, Block thenBlock, Block elseBlock, Token offset)
{
super(null,null);
super(type,offset);
this.expr = expr;
this.then_block = thenBlock;
this.else_block = elseBlock;
}
public boolean hamaDebug = true; //hama: Debug Ausgaben von mir ein- bzw. ausschalten
public Expression expr;
public Block then_block;
public Block else_block;
@Override
public void accept(StatementVisitor visitor) {

View File

@ -226,7 +226,8 @@ public class TYPEStmt implements StatementVisitor{
@Override
public void visit(Literal literal) {
throw new NotImplementedException();
//Hier gibt es nichts zu tun
//throw new NotImplementedException();
}
@Override

View File

@ -26,8 +26,8 @@ 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+"mathStruc.jav"));
//filesToTest.add(new File(rootDirectory+"test.jav"));
//filesToTest.add(new File(rootDirectory+"mathStruc.jav"));
filesToTest.add(new File(rootDirectory+"test.jav"));
//filesToTest.add(new File(rootDirectory+"Lambda.jav"));
//filesToTest.add(new File(rootDirectory+"Lambda2.jav"));
//filesToTest.add(new File(rootDirectory+"Lambda3.jav"));