Skip to content

Call functions in expression only work for num registers #41

@kobbled

Description

@kobbled

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions