|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectast.ASTNode
ast.Expr
ast.UnaryExpr
ast.UnaryIncrExpr
public class UnaryIncrExpr
The UnaryIncrExpr class represents increment shortcut expressions. It extends unary expressions so it contains an expression. Since this class is similar to other subclasses most of the functionality can be implemented in the visitor method for the parent class.
ASTNode
,
Expr
Field Summary | |
---|---|
protected boolean |
isPostfix
Boolean indicating whether operator is postfix (true) or prefix (false) |
Fields inherited from class ast.UnaryExpr |
---|
expr |
Fields inherited from class ast.ASTNode |
---|
charNum, lineNum, lineStr |
Constructor Summary | |
---|---|
UnaryIncrExpr(int lineNum,
Expr expr,
boolean isPostfix)
UnaryIncrExpr constructor |
Method Summary | |
---|---|
java.lang.Object |
accept(visitor.Visitor v,
java.lang.Object o)
Visitor method |
java.lang.String |
getOperandType()
Get the operand type |
java.lang.String |
getOpName()
Get the operation name |
java.lang.String |
getOpType()
Get the operation type |
boolean |
isPostfix()
Is this a postfix operator (as opposed to prefix)? |
Methods inherited from class ast.UnaryExpr |
---|
getExpr |
Methods inherited from class ast.Expr |
---|
getExprType, setExprType |
Methods inherited from class ast.ASTNode |
---|
getLineNum |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean isPostfix
Constructor Detail |
---|
public UnaryIncrExpr(int lineNum, Expr expr, boolean isPostfix)
lineNum
- source line number corresponding to this AST nodeexpr
- expression for incrementing (expression must be either VarExpr
or ArrayExpr)isPostfix
- boolean indicating whether operator is postfix (true) or
prefix (false)Method Detail |
---|
public java.lang.String getOpName()
getOpName
in class UnaryExpr
public java.lang.String getOpType()
getOpType
in class UnaryExpr
public java.lang.String getOperandType()
getOperandType
in class UnaryExpr
public boolean isPostfix()
isPostfix
in class UnaryExpr
public java.lang.Object accept(visitor.Visitor v, java.lang.Object o)
accept
in class UnaryExpr
v
- visitor objecto
- object to pass down
Visitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |