#include <parser.h>
Data Fields | |
| int | type |
| Type of block. | |
| int | skip |
| Whether execution of the commands in this block should be skipped. | |
| int | tok_pos |
| The start index of the block. | |
| int | had_command |
| Set to non-zero once a command has been executed in this block. | |
| int | loop_status |
| Status for the current loop block. | |
| job_t * | job |
| The job that is currently evaluated in the specified block. | |
| void * | data |
| Block type-specific data. | |
| union { | |
| int while_state | |
| True if the loop condition has not yet been evaluated. | |
| wchar_t * for_variable | |
| Name of the variable to loop over. | |
| int if_state | |
| The state of the if block, can be one of IF_STATE_UNTESTED, IF_STATE_FALSE, IF_STATE_TRUE. | |
| wchar_t * switch_value | |
| The value to test in a switch block. | |
| const wchar_t * source_dest | |
| The name of the file to source. | |
| event_t * event | |
| The event that triggered this block. | |
| wchar_t * function_call_name | |
| } | param1 |
| First block type specific variable. | |
| union { | |
| array_list_t for_vars | |
| List of values for a for block. | |
| int switch_taken | |
| Whether a switch match has already been found. | |
| process_t * function_call_process | |
| The process representing this function call. | |
| } | param2 |
| Second block type specific variable. | |
| const wchar_t * | src_filename |
| Name of file that created this block. | |
| int | src_lineno |
| Line number where this block was created. | |
| event_block_t * | first_event_block |
| Some naming confusion. | |
| struct block * | outer |
| Next outer block. | |
| int block::type |
Type of block.
Can be one of WHILE, FOR, IF and FUNCTION
Referenced by builtin_block(), builtin_break_continue(), builtin_case(), builtin_else(), builtin_end(), builtin_function(), builtin_return(), eval(), eval_job(), handle_end_loop(), is_function(), parse_job(), parse_job_argument_list(), parser_current_filename(), parser_push_block(), parser_stack_trace(), reader_handle_int(), and skipped_exec().
Status for the current loop block.
Can be any of the values from the loop_status enum.
Referenced by builtin_break_continue(), and builtin_end().
Some naming confusion.
This is a pointer to the first element in the list of all event blocks.
Referenced by builtin_block(), and event_is_blocked().
1.5.6