Interface OrdinaryLabelNode

All Superinterfaces:
ASTNode, DeclarationNode, LabelNode

public interface OrdinaryLabelNode extends LabelNode, DeclarationNode

Represents an ordinary label (i.e., a label which is not a case or default label).

A label may precede a statement, as in l1: x=1;. An instance of this class is used to represent the l1. It contains a reference to the statement which it precedes.

  • Method Details

    • getEntity

      Label getEntity()
      Returns the Label entity defined by this label node.
      Specified by:
      getEntity in interface DeclarationNode
      Returns:
      the Label entity corresponding to this label node
      See Also:
    • getFunction

      Function getFunction()
      The function in which this label occurs. A label has "function scope".
      Returns:
      the function in which this label occurs
    • setFunction

      void setFunction(Function function)
      Sets the value returned by getFunction().
      Parameters:
      function - the function in which this label occurs
    • 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 DeclarationNode
      Specified by:
      copy in interface LabelNode
      Returns:
      deep copy of this node