Class VariableReference


public final class VariableReference extends Expression
A reference to a variable, through which it can be read or written.
  • Field Details

    • kRead_ReferenceKind

      public static final int kRead_ReferenceKind
      ReferenceKinds.
      See Also:
    • kWrite_ReferenceKind

      public static final int kWrite_ReferenceKind
      ReferenceKinds.
      See Also:
    • kReadWrite_ReferenceKind

      public static final int kReadWrite_ReferenceKind
      ReferenceKinds.
      See Also:
    • kPointer_ReferenceKind

      public static final int kPointer_ReferenceKind
      ReferenceKinds.
      See Also:
  • Method Details

    • make

      @Nonnull public static Expression make(int position, Variable variable, int referenceKind)
    • getKind

      public Node.ExpressionKind getKind()
      Specified by:
      getKind in class Expression
      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
    • getVariable

      public Variable getVariable()
    • setVariable

      public void setVariable(Variable variable)
    • getReferenceKind

      public int getReferenceKind()
    • setReferenceKind

      public void setReferenceKind(int referenceKind)
    • clone

      @Nonnull public Expression clone(int position)
      Specified by:
      clone in class Expression
    • toString

      @Nonnull public String toString(int parentPrecedence)
      Specified by:
      toString in class Expression