public static class Expression.Unary extends Expression
Expression.Application
.Expression.Application, Expression.Binary, Expression.Block, Expression.Const, Expression.Ident, Expression.IfExp, Expression.LambdaExp, Expression.Tuple, Expression.Unary
Modifier and Type | Field and Description |
---|---|
Expression |
e
The subexpression, e.g., 'exp' as in 'not exp'.
|
int |
opr
The unary operator, e.g., notSy, etc..
|
Constructor and Description |
---|
Unary(int opr,
Expression e) |
Modifier and Type | Method and Description |
---|---|
void |
appendSB(java.lang.StringBuffer sb)
The use of a StringBuffer, sb, gives linear complexity when
printing large Values; also see
Expression.toString() . |
Value |
eval(Environment r)
Apply 'this' unary operator,
opr , to the
sub-Expression in the given Environment 'r'. |
int |
n()
n(), the numerical code (tag) of a subclass of Expression,
for example, for switch-ing.
|
defer, error, toString
public final int opr
public final Expression e
public Unary(int opr, Expression e)
public int n()
Expression
n
in class Expression
public Value eval(Environment r)
opr
, to the
sub-Expression in the given Environment 'r'.
Note, all unary operators are strict.eval
in class Expression
public void appendSB(java.lang.StringBuffer sb)
Expression
Expression.toString()
.appendSB
in class Expression