ast
Class BinaryLogicExpr

java.lang.Object
  extended by ast.ASTNode
      extended by ast.Expr
          extended by ast.BinaryExpr
              extended by ast.BinaryLogicExpr
Direct Known Subclasses:
BinaryLogicAndExpr, BinaryLogicOrExpr

public abstract class BinaryLogicExpr
extends BinaryExpr

The abstract BinaryLogicExpr class represents boolean logic expressions. It can be either AND ('&&') or OR ('||'). It extends BinaryExpr and contains a lefthand expression and a righthand expression. Most of the functionality can be implemented within the visitor method for BinaryExpr, however, some functionality may need to be implemented in the visitor method for each subclass.

See Also:
ASTNode, BinaryExpr

Field Summary
 
Fields inherited from class ast.BinaryExpr
leftExpr, rightExpr
 
Fields inherited from class ast.ASTNode
charNum, lineNum, lineStr
 
Constructor Summary
BinaryLogicExpr(int lineNum, Expr leftExpr, Expr rightExpr)
          BinaryLogicExpr constructor
 
Method Summary
abstract  java.lang.Object accept(visitor.Visitor v, java.lang.Object o)
          Visitor method
 
Methods inherited from class ast.BinaryExpr
getLeftExpr, getOperandType, getOpName, getOpType, 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

BinaryLogicExpr

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

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

accept

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

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