Matches do ... while loops.
This pattern only matches nodes of type statement.
Properties
doWhileLoop produces a record that contains the following properties:
| Name | Type | Description |
|---|---|---|
bodyStatement |
statement |
The statement that the loop iterates. Frequently, this is a blockStatement. |
conditionExpression |
expression |
The condition that causes the loop to terminate |
Inherits properties from:
- astnode
- statement
Example
The doWhileLoop pattern matches the following loop:
do {
i++;
} while(true);
In this instance, CodeXM sets the .conditionExpression property to the literal true, and
the .bodyStatement property to the statement {i++;}.