You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to create a nested visitor while visiting and we can't call accept() on any nested nodes because we always have const pointers or references to them.
The text was updated successfully, but these errors were encountered:
It would be great to create a nested visitor while visiting
yes, yes it would! :)
Making accept const seems reasonable from the perspective of GraphQL execution, given that we don't support any kind of AST editing right now anyway. If we end up with tools that process GraphQL queries written in C++ that want to edit the AST in-place for efficiency reasons, we can worry about adding non-const accept and some way to mutate AST nodes later.
I'll have to think about it a little more when it's not late at night, but nothing else comes to mind off the top of my head.
Any reason that
ast::Node::accept()
is notconst
?It would be great to create a nested visitor while visiting and we can't call
accept()
on any nested nodes because we always haveconst
pointers or references to them.The text was updated successfully, but these errors were encountered: