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

Method attribute support. #17

Open
otac0n opened this issue Dec 5, 2023 · 3 comments
Open

Method attribute support. #17

otac0n opened this issue Dec 5, 2023 · 3 comments

Comments

@otac0n
Copy link
Owner

otac0n commented Dec 5, 2023

In order to decorate a weave function with an attribute, it must be made private and wrapped with the desired attribute. This is not always sufficient.

Please support partial methods or a direct way to express any C# attribute from the .weave file.

@otac0n
Copy link
Owner Author

otac0n commented Dec 6, 2023

Syntax suggestion:

@[MethodInvocation(a, b, c)]

@otac0n
Copy link
Owner Author

otac0n commented Dec 6, 2023

Consider space in the syntax for supporting class-level attributes, even nested classes #16

@otac0n
Copy link
Owner Author

otac0n commented Dec 6, 2023

C# Spec, for inspiration:

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/grammar#a3-syntactic-grammar

attribute_section
    : '[' attribute_target_specifier? attribute_list ']'
    | '[' attribute_target_specifier? attribute_list ',' ']'
    ;

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

No branches or pull requests

1 participant