--- source: src/compiler/program.rs description: "intermediate representation of the program\n \\0 refers to global variable at index 0\n $0 refers to local variable at index 0\n " expression: program_as_str --- ---- const : idx->value ---- 0->global_var 1->glob_2 2->glob_or_3 3->echo 4->func with no args 5->hello 6->func with optional args: ${_loc} 7->func with one arg ${_loc} 8->arg2 9->arg3 10->arg4 11->func with optional args: ${_loc1} ${_loc2} ${_loc3} ${_loc4} ---- expressions: idx->value ---- ---- name to var: name->idx ---- GLOB1->0 GLOB_2->1 ---- funcs: idx->name->fn(nbr_args, nbr_instructions, defaults): body ---- 0->__init_global_vars__->fn(0,3,[]): glob(0) = const<0> glob(1) = const<1> glob(1) = const<2> 1->fn_0->fn(0,1,[]): cmd_const<3>(const<4>) 2->fn1_opt->fn(1,2,[5]): loc(0) = arg<1> cmd_const<3>(const<6>) 3->fn_1->fn(1,2,[]): loc(0) = arg<1> cmd_const<3>(const<7>) 4->fn4_opt->fn(4,5,[8, 9, 10]): loc(0) = arg<1> loc(1) = arg<2> loc(2) = arg<3> loc(3) = arg<4> cmd_const<3>(const<11>) 5->main->fn(0,3,[]): udf<1>() udf<2>() udf<2>(const<4>)