From: bdemsky Date: Tue, 10 Feb 2009 00:25:17 +0000 (+0000) Subject: Continue/Break node X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=281a893dc1aba2732a30f862b667222ced31f21a;p=IRC.git Continue/Break node --- diff --git a/Robust/src/IR/Tree/ContinueBreakNode.java b/Robust/src/IR/Tree/ContinueBreakNode.java new file mode 100644 index 00000000..074c9a67 --- /dev/null +++ b/Robust/src/IR/Tree/ContinueBreakNode.java @@ -0,0 +1,29 @@ +package IR.Tree; + +public class ContinueBreakNode extends BlockStatementNode { + LoopNode ln; + boolean isbreak; + + public ContinueBreakNode(boolean isbreak) { + this.isbreak=isbreak; + } + + public boolean isBreak() { + return isbreak; + } + + public void setLoop(LoopNode l) { + this.ln=l; + } + + public String printNode(int indent) { + if( isbreak ) + return "break;"; + else + return "continue;"; + } + + public int kind() { + return Kind.ContinueBreakNode; + } +}