Class GlobalVariableDecl


public final class GlobalVariableDecl extends TopLevelElement
A variable declaration appearing at global scope. A global declaration like 'int x, y;' produces two GlobalVariableDecl elements, each containing the declaration of one variable.
  • Constructor Details

    • GlobalVariableDecl

      public GlobalVariableDecl(@Nonnull VariableDecl decl)
  • Method Details

    • getVariableDecl

      public VariableDecl getVariableDecl()
    • getKind

      public Node.ElementKind getKind()
      Specified by:
      getKind in class TopLevelElement
      See Also:
    • accept

      public boolean accept(@Nonnull TreeVisitor visitor)
      Description copied from class: Node
      Visit this AST with a given visitor.
      Specified by:
      accept in class Node
      Returns:
      true to stop recursion and propagate true up the stack, false to continue
    • toString

      @Nonnull public String toString()
      Specified by:
      toString in class Node
      Returns:
      a string representation of this AST node