Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call functions in expression only work for num registers #41

Open
kobbled opened this issue Nov 1, 2022 · 0 comments
Open

Call functions in expression only work for num registers #41

kobbled opened this issue Nov 1, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@kobbled
Copy link
Owner

kobbled commented Nov 1, 2022

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 kobbled added the bug Something isn't working label Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant