|
||||||||||
| 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 v)
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 UnaryExprpublic java.lang.String getOpType()
getOpType in class UnaryExprpublic java.lang.String getOperandType()
getOperandType in class UnaryExprpublic boolean isPostfix()
isPostfix in class UnaryExprpublic java.lang.Object accept(Visitor v)
accept in class UnaryExprv - visitor object
Visitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||