Module dev.civl.abc

Interface LoopNode

All Superinterfaces:
ASTNode, BlockItemNode, StatementNode
All Known Subinterfaces:
ForLoopNode

public interface LoopNode extends StatementNode
Root of type hierarchy for every kind of loop statement. Every such statement has at least a condition specifying when to stay in the loop, and a body.
  • Method Details

    • getCondition

      ExpressionNode getCondition()
      The condition which controls when to stay in or exit the loop. For WHILE and FOR loops, evaluated before entering body; for DO_WHILE, evaluated after each execution of body.
      Returns:
      the loop condition
    • setCondition

      void setCondition(ExpressionNode condition)
      Sets the loop condition for this loop node.
      Parameters:
      condition - the loop condition
    • getBody

      StatementNode getBody()
      The loop body.
      Returns:
      the loop body
    • setBody

      void setBody(StatementNode body)
      Sets the loop body.
      Parameters:
      body - the body
    • getKind

      What kind of loop is this?
      Returns:
      the loop kind
    • loopContracts

      SequenceNode<ContractNode> loopContracts()
    • copy

      LoopNode copy()
      Description copied from interface: ASTNode
      Returns a deep copy of this AST node. The node and all of its descendants will be cloned. The cloning does not copy analysis or attribute information.
      Specified by:
      copy in interface ASTNode
      Specified by:
      copy in interface BlockItemNode
      Specified by:
      copy in interface StatementNode
      Returns:
      deep copy of this node