treeNodes
Class Conditional
java.lang.Object
generalHelpers.TreeNode
treeNodes.AbstractExpression
treeNodes.Conditional
public class Conditional
- extends AbstractExpression
Defines AST constructor 'cond'.
See TreeNode for full documentation.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pred
protected AbstractExpression pred
then_exp
protected AbstractExpression then_exp
else_exp
protected AbstractExpression else_exp
Conditional
public Conditional(int lineNumber,
AbstractExpression a1,
AbstractExpression a2,
AbstractExpression a3)
- Creates "cond" AST node.
- Parameters:
lineNumber
- the line in the source file from which this node came.a0
- initial value for preda1
- initial value for then_expa2
- initial value for else_exp
getPred
public AbstractExpression getPred()
getElseExpression
public AbstractExpression getElseExpression()
getThenExpression
public AbstractExpression getThenExpression()
copy
public TreeNode copy()
- Description copied from class:
TreeNode
- Creates a copy of this node.
- Specified by:
copy
in class TreeNode
- Returns:
- a copy of this node
dump
public void dump(java.io.Writer out,
int n)
throws java.io.IOException
- Description copied from class:
TreeNode
- Pretty-prints this node to this output stream.
- Specified by:
dump
in class TreeNode
- Parameters:
out
- the output streamn
- the number of spaces to indent the output
- Throws:
java.io.IOException
dumpWithTypes
public void dumpWithTypes(java.io.Writer out,
int n)
throws java.io.IOException
- Specified by:
dumpWithTypes
in class AbstractExpression
- Throws:
java.io.IOException