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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|