Module dev.civl.abc

Interface WhenNode

All Superinterfaces:
ASTNode, BlockItemNode, StatementNode

public interface WhenNode extends StatementNode
Represents a CIVL-C guarded command. A $when statement has the form $when (guard) body, where guard is a boolean-valued expression and body is a statement.
  • Method Details

    • getGuard

      ExpressionNode getGuard()
      The guard: a boolean expression which must hold in order for the body to be executed.
      Returns:
      the guard
    • getBody

      StatementNode getBody()
      The body of this $when statement.
      Returns:
      the body
    • copy

      WhenNode 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