void create_output_from_minor_block(Block* block, Value* description) { if (is_case_block(block)) { Block* ifBlock = get_parent_block(block); if_block_append_output(ifBlock, description); } else if (is_minor_block(block)) { append_output_placeholder_with_description(block, description); } }
Term* find_active_state_container(Block* block) { // Check if there is already a stateful input // Special case for if-block: Look for a unpack_state_from_list call if (is_case_block(block)) { Term* existing = find_term_with_function(block, FUNCS.unpack_state_from_list); if (existing != NULL) return existing; } // Special case for for-block: Look for a unpack_state_from_list call Term* existing = find_state_input(block); if (existing != NULL) return existing; return NULL; }