com.veromodo.tempo.ast
Class ASTBinary

java.lang.Object
  extended by com.veromodo.tempo.ast.ASTNode
      extended by com.veromodo.tempo.ast.ASTExpr
          extended by com.veromodo.tempo.ast.ASTBinary
All Implemented Interfaces:
Describable, Locatable, Typeable
Direct Known Subclasses:
ASTAdd, ASTAnd, ASTBinOp, ASTDiv, ASTEqual, ASTEquiv, ASTGEqual, ASTGreater, ASTImply, ASTLEqual, ASTLess, ASTMul, ASTNEqual, ASTOr, ASTPow, ASTSub

public class ASTBinary
extends ASTExpr

Representation for a binary expression.


Constructor Summary
ASTBinary(ASTToken op, ASTExpr l, ASTExpr r)
          Constructs a binary expression.
 
Method Summary
 SetOfDescriptor getAllDescriptors()
           
 ASTExpr getLeft()
          Returns the left operand of the expression.
 ASTToken getOp()
          Returns the principal operator of the expression.
 ASTExpr getRight()
          Returns the right operand of the expression.
 void setAllDescriptors(SetOfDescriptor st)
           
 void visit(ASTIVisitor v)
          Abstract method to traverse the AST via a visitor.
 
Methods inherited from class com.veromodo.tempo.ast.ASTExpr
getDescriptor, getSetOfDescriptor, getSetOfTType, getTType, setDescriptor, setSetOfDescriptor, setSetOfTType, setTType
 
Methods inherited from class com.veromodo.tempo.ast.ASTNode
getExtent, setExtent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.veromodo.tempo.util.Locatable
getExtent
 
Methods inherited from interface com.veromodo.tempo.util.Locatable
getExtent
 

Constructor Detail

ASTBinary

public ASTBinary(ASTToken op,
                 ASTExpr l,
                 ASTExpr r)
Constructs a binary expression.

Parameters:
op - the principal operator
l - the left operand
r - the right operand
Method Detail

getLeft

public ASTExpr getLeft()
Returns the left operand of the expression.


getRight

public ASTExpr getRight()
Returns the right operand of the expression.


getOp

public ASTToken getOp()
Returns the principal operator of the expression.


setAllDescriptors

public void setAllDescriptors(SetOfDescriptor st)

getAllDescriptors

public SetOfDescriptor getAllDescriptors()

visit

public void visit(ASTIVisitor v)
Description copied from class: ASTNode
Abstract method to traverse the AST via a visitor.

Overrides:
visit in class ASTExpr
Parameters:
v - the visitor interface
See Also:
ASTIVisitor