minijava.translate
Class PigletResult
java.lang.Object
minijava.translate.PigletResult
public final class PigletResult
- extends java.lang.Object
A wrapper class that packages the objects returned by a visit method of the
translator. Depending on what is being translated, a visit may return to
its caller the expression subtree of the Piglet code in generation as well
as the temporary that it assigns the expression to. If, in translating the
expression, an expression is assigned to a temporary, its temporary number
is described in result. Otherwise, it is null.
(Note: the current use of this wrapper is only for its node, MiniJava
expression subtree only yields Piglet expression subtree. No side effect
is involved, so the temporary field of the wrapper is ignored.)
- Author:
- Santoso Wijaya
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
result
public final PigletTemp result
node
public final Node node
PigletResult
public PigletResult(PigletTemp temp,
Node expr)
PigletResult
public PigletResult(Node expr)