com.go.tea.parsetree
Class RelationalExpression
java.lang.Object
|
+--com.go.tea.parsetree.Node
|
+--com.go.tea.parsetree.Expression
|
+--com.go.tea.parsetree.BinaryExpression
|
+--com.go.tea.parsetree.BinaryLogicalExpression
|
+--com.go.tea.parsetree.RelationalExpression
- All Implemented Interfaces:
- java.lang.Cloneable, Logical, java.io.Serializable
- public class RelationalExpression
- extends BinaryLogicalExpression
RelationalExpression defines seven operations, "==", "!=", "<", ">", "<="
">=" and "isa". The type of a RelationalExpression is a Boolean, set by a
type checker if there are no errors.
Operator returned is one of Token.EQ, Token.NE, Token.LT, Token.GT,
Token.LE, Token.GE or Token.ISA.
- Version:
- 25 , 9/07/00
- Author:
- Brian S O'Neill
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RelationalExpression
public RelationalExpression(SourceInfo info,
Token operator,
Expression left,
Expression right)
RelationalExpression
public RelationalExpression(SourceInfo info,
Token operator,
Expression left,
TypeName typeName)
- Used to construct an "isa" RelationalExpression.
accept
public java.lang.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
- Following copied from class:
com.go.tea.parsetree.Node
- Parameters:
visitor - A visitor of this Node- Returns:
- Node The Node returned by the visitor
- See Also:
NodeVisitor
isExceptionPossible
public boolean isExceptionPossible()
- Description copied from class:
Expression
- Returns true if an exception can be thrown while executing this
Expression. By default, returns true only if a type conversion could
cause an exception.
- Overrides:
isExceptionPossible in class BinaryExpression
getRightExpression
public Expression getRightExpression()
- Overrides:
getRightExpression in class BinaryExpression
- Returns:
- null if an "isa" RelationalExpression
getIsaTypeName
public TypeName getIsaTypeName()
- Only applies if token is "isa".