I want to parse a line of code to determine if a variable is being set or being used. For example:
A = 9
If I parse this correctly, it would tell me that "A" is being set.
HELLO = A
If I parse this correctly, it would tell me that "A" is being used.
A = A + 5
If I parse this correctly, it would tell me that "A" is being set AND used.
FYI, I can't really use:
/\bA\b\s*=/
because of this case:
HELLO(A) = 9
Does anyone have a good way of doing this? Thanks in advance!!!
A = 9
If I parse this correctly, it would tell me that "A" is being set.
HELLO = A
If I parse this correctly, it would tell me that "A" is being used.
A = A + 5
If I parse this correctly, it would tell me that "A" is being set AND used.
FYI, I can't really use:
/\bA\b\s*=/
because of this case:
HELLO(A) = 9
Does anyone have a good way of doing this? Thanks in advance!!!