forked from JavaTX/JavaCompilerCore
Constructor für IfStmt
This commit is contained in:
parent
98331af3c0
commit
201a0978bc
@ -1,22 +1,27 @@
|
|||||||
package de.dhbwstuttgart.syntaxtree.statement;
|
package de.dhbwstuttgart.syntaxtree.statement;
|
||||||
|
|
||||||
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
||||||
|
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
||||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
|
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceBlockInformation;
|
||||||
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
||||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
|
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
|
||||||
|
import org.antlr.v4.runtime.Token;
|
||||||
|
|
||||||
|
|
||||||
public class IfStmt extends Statement
|
public class IfStmt extends Statement
|
||||||
{
|
{
|
||||||
public IfStmt(int offset, int variableLength)
|
public final Expression expr;
|
||||||
{
|
public final Block then_block;
|
||||||
super(null,null);
|
public final Block else_block;
|
||||||
}
|
|
||||||
|
|
||||||
public boolean hamaDebug = true; //hama: Debug Ausgaben von mir ein- bzw. ausschalten
|
public IfStmt(RefTypeOrTPHOrWildcardOrGeneric type,
|
||||||
public Expression expr;
|
Expression expr, Block thenBlock, Block elseBlock, Token offset)
|
||||||
public Block then_block;
|
{
|
||||||
public Block else_block;
|
super(type,offset);
|
||||||
|
this.expr = expr;
|
||||||
|
this.then_block = thenBlock;
|
||||||
|
this.else_block = elseBlock;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void accept(StatementVisitor visitor) {
|
public void accept(StatementVisitor visitor) {
|
||||||
|
@ -226,7 +226,8 @@ public class TYPEStmt implements StatementVisitor{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visit(Literal literal) {
|
public void visit(Literal literal) {
|
||||||
throw new NotImplementedException();
|
//Hier gibt es nichts zu tun
|
||||||
|
//throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -26,8 +26,8 @@ public class JavaTXCompilerTest extends JavaTXCompiler {
|
|||||||
@Test
|
@Test
|
||||||
public void test() throws IOException, java.lang.ClassNotFoundException {
|
public void test() throws IOException, java.lang.ClassNotFoundException {
|
||||||
//filesToTest.add(new File(rootDirectory+"Faculty.jav"));
|
//filesToTest.add(new File(rootDirectory+"Faculty.jav"));
|
||||||
filesToTest.add(new File(rootDirectory+"mathStruc.jav"));
|
//filesToTest.add(new File(rootDirectory+"mathStruc.jav"));
|
||||||
//filesToTest.add(new File(rootDirectory+"test.jav"));
|
filesToTest.add(new File(rootDirectory+"test.jav"));
|
||||||
//filesToTest.add(new File(rootDirectory+"Lambda.jav"));
|
//filesToTest.add(new File(rootDirectory+"Lambda.jav"));
|
||||||
//filesToTest.add(new File(rootDirectory+"Lambda2.jav"));
|
//filesToTest.add(new File(rootDirectory+"Lambda2.jav"));
|
||||||
//filesToTest.add(new File(rootDirectory+"Lambda3.jav"));
|
//filesToTest.add(new File(rootDirectory+"Lambda3.jav"));
|
||||||
|
Loading…
Reference in New Issue
Block a user