Class Expr.Var

  • Enclosing class:
    Expr

    public static class Expr.Var
    extends Expr
    The class representing variable expressions.
    • Field Detail

      • name

        public final String name
        The variable name
    • Constructor Detail

      • Var

        public Var​(String name)
        Constructor for variable expressions.
        Parameters:
        name - the variable name
    • Method Detail

      • toString

        public String toString()
        Returns a string representation.
        Overrides:
        toString in class Object
        Returns:
        the string representation
      • accept

        public <R> R accept​(Visitor<R> v)
        Accepts a visitor by calling the Visitor.visitVar(Var) method.
        Specified by:
        accept in class Expr
        Type Parameters:
        R - the type of the return value of the visitor.
        Parameters:
        v - the visitor
        Returns:
        the return value