Package EDU.purdue.cs.bloat.tree
Class IfCmpStmt
- java.lang.Object
-
- EDU.purdue.cs.bloat.tree.Node
-
- EDU.purdue.cs.bloat.tree.Stmt
-
- EDU.purdue.cs.bloat.tree.JumpStmt
-
- EDU.purdue.cs.bloat.tree.IfStmt
-
- EDU.purdue.cs.bloat.tree.IfCmpStmt
-
public class IfCmpStmt extends IfStmt
IfCmpStmt consists of a comparison expression (a left-hand expression, a comparison operator, and a right-hand expression) that is to be evaluated.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Exprleft()Exprright()voidvisit(TreeVisitor visitor)voidvisitForceChildren(TreeVisitor visitor)Visit the children of this node.-
Methods inherited from class EDU.purdue.cs.bloat.tree.IfStmt
comparison, falseTarget, negate, setFalseTarget, setTrueTarget, trueTarget
-
Methods inherited from class EDU.purdue.cs.bloat.tree.JumpStmt
catchTargets, copyInto
-
Methods inherited from class EDU.purdue.cs.bloat.tree.Stmt
cleanupOnly
-
Methods inherited from class EDU.purdue.cs.bloat.tree.Node
block, cleanup, hasParent, key, parent, replaceWith, replaceWith, setKey, setParent, setValueNumber, toString, valueNumber, visitChildren, visitOnly
-
-
-
-
Constructor Detail
-
IfCmpStmt
public IfCmpStmt(int comparison, Expr left, Expr right, Block trueTarget, Block falseTarget)Constructor.- Parameters:
comparison- Comparison operator for this if statement.left- Expression on the left side of the comparison.right- Expression on the right side of the comparison.trueTarget- Block executed if comparison evaluates to true.falseTarget- Block executed if comparison evaluates to false.
-
-
Method Detail
-
left
public Expr left()
-
right
public Expr right()
-
visitForceChildren
public void visitForceChildren(TreeVisitor visitor)
Description copied from class:NodeVisit the children of this node. Not all Nodes will have children to visit.- Specified by:
visitForceChildrenin classNode
-
visit
public void visit(TreeVisitor visitor)
-
-