tp_plus icon indicating copy to clipboard operation
tp_plus copied to clipboard

Call functions in expression only work for num registers

Open kobbled opened this issue 3 years ago • 0 comments

There is currently no way to tell if the return of a call statement in a expression is a posreg, or a numreg, due to handle_arg_funcs in CallNode being evaluated during parsing, before the functions are evaluated, and the return type of a function is decided. Also the preprocessing of local variables is done before funtions.

# first pass
      #---------
      #set a list of declared positions into @pose_list
      #populate_pose_set
      #create definitions from ranges
      traverse_nodes(@nodes, :preprocess_local_variables)

      # second pass
      #----------
      #prepare/allocate functions
      traverse_nodes(@nodes, :preprocess_functions)

This may have to be switched around in order for this issue to be resolved.

kobbled avatar Nov 01 '22 03:11 kobbled