fn get_iter_sym(
    opt: &Option<Box<Expr>>,
    prog: &mut SirProgram,
    cur_func: &mut FunctionId,
    cur_block: &mut BasicBlockId,
    tracker: &mut StatementTracker,
    body_func: FunctionId,
) -> WeldResult<Option<Symbol>> {
    if let Some(ref opt_expr) = *opt {
        let opt_res = gen_expr(&opt_expr, prog, *cur_func, *cur_block, tracker)?;
        *cur_func = opt_res.0;
        *cur_block = opt_res.1;
        prog.funcs[body_func]
            .params
            .insert(opt_res.2.clone(), opt_expr.ty.clone());
        Ok(Some(opt_res.2))
    } else {
        Ok(None)
    }
}
Helper method for gen_expr. Used to process the fields of ParallelForIter, like "start",
"shape" etc. Returns None, or the Symbol associated with the field. It also resets values for
cur_func, and cur_block.
weld/src/sir/mod.rs