-
Notifications
You must be signed in to change notification settings - Fork 202
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
feat(c_sharp) add @assignment support for all possible assignable statements #720
base: master
Are you sure you want to change the base?
feat(c_sharp) add @assignment support for all possible assignable statements #720
Conversation
…ements Supports for all assignment statements. Lambda Method ```cs public static string Method() => $"return result"; ``` class/struct/record fields ```cs const int CONST_FIELD = 10; public static Node head; public static Node tempHead = new Node(); ``` local variables declarations ```cs int count = 10; int[] arr = new int[] {1, 2, 3, 4, 5, 6}; head = new Node{data = arr[0]}; count = 100; ``` Above local fields also support in field scope
Any update on this PR... |
@prashanthsp6498 Hi, sorry for the delay. C# is not a language I personally use and I find it time-consuming to test all query PRs.
@clason I think this should be mandatory in all query PRs. It's hard to really keep track of all queries manually. |
(expression_statement | ||
(assignment_expression | ||
left: (_) @assignment.lhs | ||
right: (_) @assignment.rhs)) @assignment.inner @assignment.outer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inner and outer should not mean the same thing. Inner refers to "either" LHS or RHS, outer means select both. Sorry, this isn't documented very clearly as of now. (although I wrote a comment on this query, all queries seem to be wrong and need to be fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will fix these queries and add test cases.
Supports for all assignment statements.
Lambda Method
class/struct/record fields
local variables declarations
Above local fields also support in field scope