Interface CastNode

All Superinterfaces:
ASTNode, ExpressionNode, ForLoopInitializerNode, InitializerNode, SizeableNode

public interface CastNode extends ExpressionNode
A C cast expression has the form (typeName)expr. The type to which the expression is being cast (typeName) is obtained via method getCastType(). See C11 Sec. 6.5.4.
  • Method Details

    • getCastType

      TypeNode getCastType()
      Returns the node representing the type name in the cast expression
      Returns:
      the node representing the type name
      See Also:
    • getArgument

      ExpressionNode getArgument()
      Returns the node representing the expression argument of this cast expression.
      Returns:
      the node for the expression being cast to a new type
      See Also:
    • setCastType

      void setCastType(TypeNode type)
      Sets the value that will be returned by getCastType().
      Parameters:
      type - the node representing the type name
    • setArgument

      void setArgument(ExpressionNode expression)
      Sets the value that will be returned by getArgument().
      Parameters:
      expression - the node for the expression being cast to a new type
    • copy

      CastNode 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 ExpressionNode
      Specified by:
      copy in interface ForLoopInitializerNode
      Specified by:
      copy in interface InitializerNode
      Specified by:
      copy in interface SizeableNode
      Returns:
      deep copy of this node