Class Expr.And

  • Enclosing class:
    Expr

    public static class Expr.And
    extends Expr.BinOp
    Class representing and-expressions.
    • Constructor Detail

      • And

        public And​(Expr left,
                   Expr right)
        Constructor initializing left and right subexpressions.
        Parameters:
        left - the left subexpression
        right - the right subexpression
    • Method Detail

      • getOp

        protected String getOp()
        Returns " && " as string for the operator.
        Specified by:
        getOp in class Expr.BinOp
        Returns:
        " && "
      • accept

        public <R> R accept​(Visitor<R> v)
        Accepts a visitor by calling the Visitor.visitAnd(And) 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