mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-09 21:33:43 +00:00
c6788416d7
New.
28 lines
651 B
Java
28 lines
651 B
Java
class UnaryNode extends ExpressionNode {
|
|
|
|
UnaryNode(String aOp, ExpressionNode aChild)
|
|
{
|
|
child = aChild;
|
|
op = aOp;
|
|
}
|
|
|
|
String print(String indent)
|
|
{
|
|
StringBuffer result = new StringBuffer(indent);
|
|
result.append("UnaryNode ");
|
|
result.append(op);
|
|
result.append("\n");
|
|
indent += " ";
|
|
if (child == null) {
|
|
result.append(indent);
|
|
result.append("null\n");
|
|
}
|
|
else
|
|
result.append(child.print(indent));
|
|
return result.toString();
|
|
}
|
|
|
|
protected ExpressionNode child;
|
|
protected String op;
|
|
|
|
} |