geneseo.cs.miniml
Class TailActualsNode
java.lang.Object
|
+--geneseo.cs.miniml.MinimLParseNode
|
+--geneseo.cs.miniml.TailActualsNode
- All Implemented Interfaces:
- ParseNode
- public class TailActualsNode
- extends MinimLParseNode
Represents an actual parameter within the actual parameter list
of a tail call (a function call that is the last thing the
caller does). A little more precisely, a TailActualsNode
represents the head node in the actual parameter list,
which contains one actual parameter expression and a reference
to the remainder of the list.
Method Summary |
void |
acceptVisit(MinimLParseVisitor visitor)
Allow a visitor object to process a tail call's actual parameter list. |
MinimLParseNode |
getActual()
Retrieve the actual parameter expression from a tail call actual parameter
node. |
MinimLParseNode |
getNext()
Retrieve the tail of a tail call's actual parameter list. |
void |
setActual(MinimLParseNode newActual)
Change the actual parameter expression contained in a tail call's
actual parameter node. |
java.lang.String |
toString()
Generate a string representation of a tail call's actual parameter list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TailActualsNode
public TailActualsNode(MinimLParseNode actual,
MinimLParseNode next)
- Initialize a tail call's actual parameter node from the actual
parameter expression and the list of actuals that follow it.
- Parameters:
actual
- The root of the syntax tree for the actual parameter
expression.next
- The next actual parameter node in the parameter list.
getActual
public MinimLParseNode getActual()
- Retrieve the actual parameter expression from a tail call actual parameter
node.
- Returns:
- The root of the syntax tree for the actual parameter expression.
setActual
public void setActual(MinimLParseNode newActual)
- Change the actual parameter expression contained in a tail call's
actual parameter node.
- Parameters:
newActual
- The root of the syntax tree for the new actual
parameter expression.
getNext
public MinimLParseNode getNext()
- Retrieve the tail of a tail call's actual parameter list.
- Returns:
- The actual parameter node for the second (and thus subsequent)
nodes in the actual parameter list.
acceptVisit
public void acceptVisit(MinimLParseVisitor visitor)
throws CompilerException
- Allow a visitor object to process a tail call's actual parameter list.
Exactly what the visitor does to the list is up to the visitor.
- Overrides:
acceptVisit
in class MinimLParseNode
- Parameters:
visitor
- The visitor object that wishes to process the parameter list.- Throws:
CompilerException
- If thrown by the visitor.
toString
public java.lang.String toString()
- Generate a string representation of a tail call's actual parameter list.
- Overrides:
toString
in class java.lang.Object
- Returns:
- A string that identifies a syntax tree node as the head of
an actual parameter list.