public interface IWhileLoopNode extends IConditionalNode
while
or do-while statement.
The shape of this node is
IWhileLoopNode
IExpressionNode <-- getConditionalExpressionNode()
IBlockNode <-- getStatementContentsNode()
in the case of a while statement and
IWhileLoopNode
IBlockNode <-- getStatementContentsNode()
IExpressionNode <-- getConditionalExpressionNode()
in the case of a do-while statement.
Example 1:
while (a > b)
{
a--;
b++;
}
is represented as
IWhileLoopNode
IBinaryOperatorNode ">"
IIdentifierNode "a"
IIdentiferNode "b"
IBlockNode
IUnaryOperatorNode "--"
IIdentifierNode "a"
IUnaryOperatorNode "++"
IIdentifierNode "b"
Example 2:
do
{
a--;
b++;
}
while (a > b)
is represented as
IWhileLoopNode
IBlockNode
IUnaryOperatorNode "--"
IIdentifierNode "a"
IUnaryOperatorNode "++"
IIdentifierNode "b"
IBinaryOperatorNode ">"
IIdentifierNode "a"
IIdentiferNode "b"
An implicit IBlockNode is created
when there are no curly braces.| Modifier and Type | Interface and Description |
|---|---|
static class |
IWhileLoopNode.WhileLoopKind
A WhileLoopKind represents different kinds of while loops
|
UNKNOWN| Modifier and Type | Method and Description |
|---|---|
IWhileLoopNode.WhileLoopKind |
getKind()
Returns the kind of the while loop
|
getConditionalExpressionNodegetStatementContentsNodecontains, getAncestorOfType, getChild, getChildCount, getContainingNode, getContainingScope, getFileSpecification, getNodeID, getPackageName, getParent, getSpanningStart, getSucceedingNode, isTerminalgetAbsoluteEnd, getAbsoluteStart, getColumn, getEnd, getEndColumn, getEndLine, getLine, getSourcePath, getStartIWhileLoopNode.WhileLoopKind getKind()
IWhileLoopNode.WhileLoopKindCopyright © 2016 The Apache Software Foundation. All rights reserved.