|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectast.ASTNode
ast.Expr
ast.ConstExpr
ast.ConstIntExpr
public class ConstIntExpr
The ConstIntExpr class represents an integer constant expression. It extends constant expressions so it contains a constant value (represented as a String). It also stores the constant as an int (intConstant). Since this class is similar to other subclasses most of the functionality can be implemented in the visitor method for the parent class.
ASTNode,
ConstExpr| Field Summary |
|---|
| Fields inherited from class ast.ConstExpr |
|---|
constant |
| Fields inherited from class ast.ASTNode |
|---|
charNum, lineNum, lineStr |
| Constructor Summary | |
|---|---|
ConstIntExpr(int lineNum,
java.lang.String constant)
ConstIntExpr constructor |
|
| Method Summary | |
|---|---|
java.lang.Object |
accept(Visitor v)
Visitor method |
int |
getIntConstant()
Get the constant value represented as an int |
| Methods inherited from class ast.ConstExpr |
|---|
getConstant |
| 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 |
| Constructor Detail |
|---|
public ConstIntExpr(int lineNum,
java.lang.String constant)
lineNum - source line number corresponding to this AST nodeconstant - constant value (as a String)| Method Detail |
|---|
public int getIntConstant()
public java.lang.Object accept(Visitor v)
accept in class ConstExprv - visitor object
Visitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||