Class 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.
  • Constructor Details

    • 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 Details

    • left

      public Expr left()
    • right

      public Expr right()
    • visitForceChildren

      public void visitForceChildren(TreeVisitor visitor)
      Description copied from class: Node
      Visit the children of this node. Not all Nodes will have children to visit.
      Specified by:
      visitForceChildren in class Node
    • visit

      public void visit(TreeVisitor visitor)
      Specified by:
      visit in class Node
    • clone

      public Object clone()
      Specified by:
      clone in class Stmt