Closed thvnx closed 2 years ago
More general comment: It is said in the original ticket that this work could allow removing some duplicated logic. Could you find any opportunities to do so?
Actually, not really. I just simplified Name.is_constant
property but I didn't find any other place where it would be beneficial to call Name.kind
. I could move the code for is_call
, or is_array_slice
here and call kind
where they are used, not sure it worth the effort though.
I could move the code for is_call, or is_array_slice here and call kind where they are used, not sure it worth the effort though.
I don't think it's a good idea either. Let's leave it like that then, thanks for investigating!
Add a new property
CallExpr.kind
to query the kind of aCallExpr
(call, array slice, array index, or type conversion). It returns aCallExprKind
enum value.TN: UC22-030