-
-
Notifications
You must be signed in to change notification settings - Fork 475
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
Rename #[visited_node]
attr to #[ast]
#4282
Comments
From day one I was a fan of this more than any other way so that's where I'm. #[ast(visit)]
enum Expression<'a> { /* ... */ } If you remember at first I was more in favor of naming it |
I had an idea for generated derives which I've never shared publicly. We might want to add an attribute such as It is a marker and wouldn't expand the derived macro base on the builtins(or proc_macro_derive), but it is a good way to telegraph that these are being derived for the said type although they are generated and not happening in the compiler. |
@Boshen and I discussed on video call just now. He's given his 👍 to this. |
closes #4282 I went with `#[ast(visit)]` but we can change it to 2 separate markers as suggested by @overlookmotel in the issue.
closed via #4289 |
At present we only have
#[visited_node]
attrs on types which are visited.We will also need to add an attribute to all types which are part of AST but are not visited, for:
CloneIn
trait for AST nodes #4284#[repr(C)]
#4296Currently:
I propose:
or:
Types which are part of AST, but which are not visited would omit the
visit
part e.g.:Bikeshedding
We could call the attr something other than
#[ast]
. I considered#[ast_node]
but:FunctionType
) are not AST nodes per se.The common factor between all these types is that they're part of the AST, so
#[ast]
seems descriptive.But I'm not at all set on that name, if someone has a better suggestion.
cc @Boshen @rzvxa.
The text was updated successfully, but these errors were encountered: