Skip to content

Combine ARef, ARefField, CallNode, Command, CommandCall, Field, Not, Unary, and VCall into CallNode #355

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

Closed
kddnewton opened this issue Mar 26, 2023 · 0 comments
Labels
Milestone

Comments

@kddnewton
Copy link
Member

kddnewton commented Mar 26, 2023

All of these various nodes represent method calls. They should all be part of the same node. It is very confusing to have to manually look for every kind of node in every visitor.

YARP has:

  • receiver (the receiver of the call, optional)
  • operator (the operator used, ., &., or ::)
  • message (the message being sent)
  • opening_loc (the optional left parenthesis or bracket)
  • arguments (the arguments node)
  • closing_loc (the optional right parenthesis or bracket)
  • block (the optional block)
  • name (the synthesized name of the call)

In most cases name will match message but if you have something like foo.bar = 1 then message will be bar and name will be "bar=". In foo.() message will be nil but name will be "call".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant