org.teatrove.tea.parsetree
Class ArithmeticExpression

java.lang.Object
  extended by org.teatrove.tea.parsetree.Node
      extended by org.teatrove.tea.parsetree.Expression
          extended by org.teatrove.tea.parsetree.BinaryExpression
              extended by org.teatrove.tea.parsetree.ArithmeticExpression
All Implemented Interfaces:
Serializable, Cloneable

public class ArithmeticExpression
extends BinaryExpression

ArithmeticExpression defines addition, subtraction, multiplication, division or remainder operations. The type of an ArithmeticExpression is a Number, set by a type checker if there are no errors.

Operator returned is one of Token.PLUS, Token.MINUS, Token.MULT, Token.DIV or Token.MOD.

Author:
Brian S O'Neill
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.teatrove.tea.parsetree.Expression
Expression.Conversion
 
Constructor Summary
ArithmeticExpression(SourceInfo info, Token operator, Expression left, Expression right)
           
 
Method Summary
 Object accept(NodeVisitor visitor)
          Every subclass of Node must override this method with the following: return visitor.visit(this).
 
Methods inherited from class org.teatrove.tea.parsetree.BinaryExpression
clone, getLeftExpression, getOperator, getRightExpression, isExceptionPossible, setLeftExpression, setRightExpression, setType
 
Methods inherited from class org.teatrove.tea.parsetree.Expression
convertTo, convertTo, forceConversion, getConversionChain, getInitialType, getType, getValue, isValueKnown, setInitialType
 
Methods inherited from class org.teatrove.tea.parsetree.Node
getSourceInfo, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArithmeticExpression

public ArithmeticExpression(SourceInfo info,
                            Token operator,
                            Expression left,
                            Expression right)
Method Detail

accept

public Object accept(NodeVisitor visitor)
Description copied from class: Node
Every subclass of Node must override this method with the following: return visitor.visit(this).

Overrides:
accept in class Expression
Parameters:
visitor - A visitor of this Node
Returns:
Node The Node returned by the visitor
See Also:
NodeVisitor


Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.