mirror of https://github.com/aamine/cbc
24 lines
521 B
Java
24 lines
521 B
Java
package net.loveruby.cflat.ast;
|
|
import net.loveruby.cflat.asm.*;
|
|
|
|
public class LogicalOrNode extends BinaryOpNode {
|
|
protected LabelPool pool;
|
|
protected Label endLabel;
|
|
|
|
public LogicalOrNode(LabelPool lp, Node left, Node right) {
|
|
super(left, right);
|
|
pool = lp;
|
|
}
|
|
|
|
public void accept(ASTVisitor visitor) {
|
|
visitor.visit(this);
|
|
}
|
|
|
|
public Label endLabel() {
|
|
if (endLabel == null) {
|
|
endLabel = pool.newLabel();
|
|
}
|
|
return endLabel;
|
|
}
|
|
}
|