mirror of https://github.com/aamine/cbc
33 lines
641 B
Java
33 lines
641 B
Java
package net.loveruby.cflat.ast;
|
|
import net.loveruby.cflat.asm.Label;
|
|
|
|
public class BreakNode extends StmtNode {
|
|
public BreakNode(Location loc) {
|
|
super(loc);
|
|
}
|
|
|
|
protected Label label;
|
|
|
|
public void setTargetLabel(Label label) {
|
|
this.label = label;
|
|
}
|
|
|
|
public Label targetLabel() {
|
|
if (label == null) {
|
|
throw new Error("break label is null");
|
|
}
|
|
return label;
|
|
}
|
|
|
|
public Location location() {
|
|
return location;
|
|
}
|
|
|
|
protected void _dump(Dumper d) {
|
|
}
|
|
|
|
public BreakNode accept(ASTVisitor visitor) {
|
|
return visitor.visit(this);
|
|
}
|
|
}
|