Describes for and while loop representation.
More...
|
enum | ast_loop_type {
LOOP_FOREVER,
LOOP_REPEAT,
LOOP_WHILE,
LOOP_FOR,
LOOP_GENERATE
} |
| Describes the different syntactic methods of looping.
|
|
Describes for and while loop representation.
ast_loop_statement* ast_new_for_loop_statement |
( |
ast_statement * |
inner_statement, |
|
|
ast_single_assignment * |
initial_condition, |
|
|
ast_single_assignment * |
modify_assignment, |
|
|
ast_expression * |
continue_condition |
|
) |
| |
Creates and returns a new for loop statement.
- Parameters
-
inner_statements | - Pointer to the inner body of statements which make up the loop body. |
initial_condition | - Assignement which sets up the initial condition of the iterator. |
modify_assignment | - How the iterator variable changes with each loop iteration. |
continue_condition | - Expression which governs whether the loop should continue or break. |
inner_statement | - Pointer to the inner body of statements which make upt the loop body. |
initial_condition | - Assignement which sets up the initial condition of the iterator. |
modify_assignment | - How the iterator variable changes with each loop iteration. |
continue_condition | - Expression which governs whether the loop should continue or break. |
Creates and returns a new forever loop statement.
- Parameters
-
inner_statement | - Pointer to the inner body of statements which make upt the loop body. |
ast_loop_statement* ast_new_generate_loop_statement |
( |
ast_list * |
inner_statements, |
|
|
ast_single_assignment * |
initial_condition, |
|
|
ast_single_assignment * |
modify_assignment, |
|
|
ast_expression * |
continue_condition |
|
) |
| |
Creates and returns a new generate loop statement.
- Parameters
-
inner_statements | - Pointer to the inner body of statements which make up the loop body. |
initial_condition | - Assignement which sets up the initial condition of the iterator. |
modify_assignment | - How the iterator variable changes with each loop iteration. |
continue_condition | - Expression which governs whether the loop should continue or break. |
ast_loop_statement* ast_new_repeat_loop_statement |
( |
ast_statement * |
inner_statement, |
|
|
ast_expression * |
continue_condition |
|
) |
| |
Creates and returns a repeat loop statement.
- Parameters
-
inner_statement | - Pointer to the inner body of statements which make upt the loop body. |
continue_condition | - Expression which governs whether the loop should continue or break. |
ast_loop_statement* ast_new_while_loop_statement |
( |
ast_statement * |
inner_statement, |
|
|
ast_expression * |
continue_condition |
|
) |
| |
Creates and returns a while loop statement.
- Parameters
-
inner_statement | - Pointer to the inner body of statements which make upt the loop body. |
continue_condition | - Expression which governs whether the loop should continue or break. |