|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjparse.CompileContext
Information about the compilation context so that individual AST nodes can set up needed values
Field Summary | |
private LinkedList |
breakTarget
The current targets for break statements; i.e., the
closest enclosing for , while ,
do-while , or switch statements. |
private LinkedList |
continueTarget
The current targets for continue statements; i.e., the
closest enclosing for , while , or
do-while statements. |
boolean |
isField
Whether the current construct is a field (top-level construct in a class), or not. |
ModifierAST |
mods
The current modifiers |
boolean |
negative
The current sign of a number being read, true for negative
or false for positive. |
StatementAST |
nextStmt
The next statement in sequence after the current one |
TypeAST |
type
The current variable or array base type |
Constructor Summary | |
CompileContext()
|
Method Summary | |
StatementAST |
breakTarget()
Get the current break target |
StatementAST |
continueTarget()
Get the current continue target |
void |
popBreak()
Pop a break target off of the stack |
void |
popContinue()
Pop a continue (and break) target off of the stack |
void |
pushBreak(JavaAST target)
Push a new break target onto the stack |
void |
pushContinue(JavaAST target)
Push a new continue (and break) target onto the stack |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public boolean isField
public StatementAST nextStmt
public ModifierAST mods
public TypeAST type
public boolean negative
true
for negative
or false
for positive. This is necessary to avoid a
NumberFormatException
when
reading in the most negative number.
private final LinkedList breakTarget
break
statements; i.e., the
closest enclosing for
, while
,
do-while
, or switch
statements.
private final LinkedList continueTarget
continue
statements; i.e., the
closest enclosing for
, while
, or
do-while
statements.
Constructor Detail |
public CompileContext()
Method Detail |
public void pushBreak(JavaAST target)
target
- the new break targetpublic void popBreak()
public StatementAST breakTarget()
public void pushContinue(JavaAST target)
target
- the new continue targetpublic void popContinue()
public StatementAST continueTarget()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |