projects
/
IRC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
start of new file
[IRC.git]
/
Robust
/
src
/
IR
/
Tree
/
LoopNode.java
diff --git
a/Robust/src/IR/Tree/LoopNode.java
b/Robust/src/IR/Tree/LoopNode.java
index f387d6c0fdca624e32b04b4eae7d9abc7a8ff96c..d604b1aae6565093e1a34079ece10499ebd46aba 100644
(file)
--- a/
Robust/src/IR/Tree/LoopNode.java
+++ b/
Robust/src/IR/Tree/LoopNode.java
@@
-1,6
+1,6
@@
package IR.Tree;
package IR.Tree;
-class LoopNode extends BlockStatementNode {
+
public
class LoopNode extends BlockStatementNode {
BlockNode initializer;
ExpressionNode condition;
BlockNode update;
BlockNode initializer;
ExpressionNode condition;
BlockNode update;
@@
-26,6
+26,22
@@
class LoopNode extends BlockStatementNode {
this.type=type;
}
this.type=type;
}
+ public BlockNode getInitializer() {
+ return initializer;
+ }
+
+ public ExpressionNode getCondition() {
+ return condition;
+ }
+
+ public BlockNode getUpdate() {
+ return update;
+ }
+
+ public BlockNode getBody() {
+ return body;
+ }
+
public String printNode(int indent) {
if (type==FORLOOP) {
return "for("+initializer.printNode(0)+";"+condition.printNode(0)+
public String printNode(int indent) {
if (type==FORLOOP) {
return "for("+initializer.printNode(0)+";"+condition.printNode(0)+
@@
-38,6
+54,10
@@
class LoopNode extends BlockStatementNode {
} else throw new Error();
}
} else throw new Error();
}
+ public int getType() {
+ return type;
+ }
+
public int kind() {
return Kind.LoopNode;
}
public int kind() {
return Kind.LoopNode;
}