ast
Class BinaryCompExpr
java.lang.Object
ast.ASTNode
ast.Expr
ast.BinaryExpr
ast.BinaryCompExpr
- Direct Known Subclasses:
- BinaryCompEqExpr, BinaryCompGeqExpr, BinaryCompGtExpr, BinaryCompLeqExpr, BinaryCompLtExpr, BinaryCompNeExpr
public abstract class BinaryCompExpr
- extends BinaryExpr
The abstract BinaryCompExpr class represents comparison expressions.
It can be either an equivalence ('==' or '!=') or an inequality ('<', '>',
'<=', '>='). 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
Method Summary |
abstract java.lang.Object |
accept(visitor.Visitor v,
java.lang.Object o)
Visitor method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BinaryCompExpr
public BinaryCompExpr(int lineNum,
Expr leftExpr,
Expr rightExpr)
- BinaryCompExpr constructor
- Parameters:
lineNum
- source line number corresponding to this AST nodeleftExpr
- left operand expressionrightExpr
- right operand expression
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 objecto
- object to pass down
- Returns:
- result of visiting this node
- See Also:
Visitor