ast
Class BinaryLogicAndExpr

java.lang.Object
  extended by ast.ASTNode
      extended by ast.Expr
          extended by ast.BinaryExpr
              extended by ast.BinaryLogicExpr
                  extended by ast.BinaryLogicAndExpr

public class BinaryLogicAndExpr
extends BinaryLogicExpr

The BinaryLogicAndExpr class represents logical AND expressions. It extends binary logical expressions so it contains a lefthand expression and a righthand expression. Since this class is similar to other subclasses most of the functionality can be implemented in the visitor method for the parent class.

See Also:
ASTNode, BinaryLogicExpr

Field Summary
 
Fields inherited from class ast.BinaryExpr
leftExpr, rightExpr
 
Fields inherited from class ast.ASTNode
charNum, lineNum, lineStr
 
Constructor Summary
BinaryLogicAndExpr(int lineNum, Expr leftExpr, Expr rightExpr)
          BinaryLogicAndExpr constructor
 
Method Summary
 java.lang.Object accept(visitor.Visitor v, java.lang.Object o)
          Visitor method
 java.lang.String getOperandType()
          Get the operand type
 java.lang.String getOpName()
          Get the operation name
 java.lang.String getOpType()
          Get the operation type
 
Methods inherited from class ast.BinaryExpr
getLeftExpr, getRightExpr
 
Methods inherited from class ast.Expr
getExprType, setExprType
 
Methods inherited from class ast.ASTNode
getLineNum
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryLogicAndExpr

public BinaryLogicAndExpr(int lineNum,
                          Expr leftExpr,
                          Expr rightExpr)
BinaryLogicAndExpr constructor

Parameters:
lineNum - source line number corresponding to this AST node
leftExpr - lefthand expression for AND-ing
rightExpr - righthand expression for AND-ing
Method Detail

getOpName

public java.lang.String getOpName()
Get the operation name

Specified by:
getOpName in class BinaryExpr
Returns:
op name

getOpType

public java.lang.String getOpType()
Get the operation type

Specified by:
getOpType in class BinaryExpr
Returns:
op type

getOperandType

public java.lang.String getOperandType()
Get the operand type

Specified by:
getOperandType in class BinaryExpr
Returns:
operand type

accept

public java.lang.Object accept(visitor.Visitor v,
                               java.lang.Object o)
Visitor method

Specified by:
accept in class BinaryLogicExpr
Parameters:
v - visitor object
o - object to pass down
Returns:
result of visiting this node
See Also:
Visitor