forked from JavaTX/JavaCompilerCore
32 lines
759 B
Java
32 lines
759 B
Java
package de.dhbwstuttgart.syntaxtree.statement;
|
|
|
|
import org.antlr.v4.runtime.Token;
|
|
|
|
import de.dhbwstuttgart.syntaxtree.StatementVisitor;
|
|
import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric;
|
|
|
|
public class BoolExpression extends Expression {
|
|
|
|
public enum Operator {
|
|
AND, // &&
|
|
OR, // ||
|
|
}
|
|
|
|
public final Operator operation;
|
|
public final Expression lexpr;
|
|
public final Expression rexpr;
|
|
|
|
public BoolExpression(Operator operation, RefTypeOrTPHOrWildcardOrGeneric type, Expression lexpr, Expression rexpr, Token offset) {
|
|
super(type, offset);
|
|
this.operation = operation;
|
|
this.lexpr = lexpr;
|
|
this.rexpr = rexpr;
|
|
}
|
|
|
|
@Override
|
|
public void accept(StatementVisitor visitor) {
|
|
visitor.visit(this);
|
|
}
|
|
|
|
}
|