public abstract class UnaryExpr extends Expr
Constructor and Description |
---|
UnaryExpr(int lineNum,
Expr expr)
UnaryExpr constructor
|
Modifier and Type | Method and Description |
---|---|
abstract java.lang.Object |
accept(visitor.Visitor v,
java.lang.Object o)
Visitor method
|
Expr |
getExpr()
Get the expression
|
abstract java.lang.String |
getOperandType()
Get the operand type (e.g., "boolean")
(must be defined by each subclass)
|
abstract java.lang.String |
getOpName()
Get the operation name (e.g., "!")
|
abstract java.lang.String |
getOpType()
Get the operation type (e.g., "boolean")
(must be defined by each subclass)
|
abstract boolean |
isPostfix()
Is this a postfix operator (as opposed to prefix)?
|
getExprType, setExprType
getLineNum
protected Expr expr
public UnaryExpr(int lineNum, Expr expr)
lineNum
- source line number corresponding to this AST nodeexpr
- expressionpublic Expr getExpr()
public abstract java.lang.String getOpName()
public abstract java.lang.String getOpType()
public abstract java.lang.String getOperandType()
public abstract boolean isPostfix()