|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object avrora.syntax.ASTNode avrora.syntax.Expr avrora.syntax.Expr.Term avrora.syntax.Expr.Constant
The Constant
class represents a integer literal (a constant) within the program.
Nested Class Summary |
Nested classes inherited from class avrora.syntax.Expr |
Expr.BinOp, Expr.CharLiteral, Expr.Constant, Expr.Func, Expr.RelativeAddress, Expr.StringLiteral, Expr.Term, Expr.UnOp, Expr.Variable |
Field Summary | |
int |
value
|
Fields inherited from class avrora.syntax.Expr.Term |
token |
Constructor Summary | |
Expr.Constant(AbstractToken tok)
|
Method Summary | |
int |
evaluate(int currentByteAddress,
Context c)
The evaluate() method computes the value of the expression in this context and returns
its value. |
Methods inherited from class avrora.syntax.Expr.Term |
getLeftMostToken, getRightMostToken, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public final int value
Constructor Detail |
public Expr.Constant(AbstractToken tok)
Method Detail |
public int evaluate(int currentByteAddress, Context c)
evaluate()
method computes the value of the expression in this context and returns
its value. Since this is a constant, it simply returns its value.
evaluate
in class Expr
currentByteAddress
- the current byte address within the programc
- the context in which to evaluate this expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |