@mylinhdao In #256 you have mentioned the issue that we currently count xor as logical binary operator in C++. This is an alternative representation for ^ for encodings that do not support the ^character, which still means a bitwise xor (see source here).
Could you take care to bring your test cases for this out of your old branch for #256 to a new branch for this issue here?
@mylinhdao @clemens-mw I have seen that the proposed fix for this was to give binary_expression_xor the "binary_expression" category instead of "logical_binary_expression". As PHP also includes this node and it seems to be a logical operator there, you might use the activated_for field to use it only for PHP. That should be fine as long as we do not need to evaluate the category "binary_expression" for any metric. Assinging "binary_expression" for C++ and "logical_binary_expression" for PHP would require #231 which I do not think should be done before we actually need it.
@mylinhdao In #256 you have mentioned the issue that we currently count
xor
as logical binary operator in C++. This is an alternative representation for^
for encodings that do not support the^
character, which still means a bitwise xor (see source here).Could you take care to bring your test cases for this out of your old branch for #256 to a new branch for this issue here?
@mylinhdao @clemens-mw I have seen that the proposed fix for this was to give
binary_expression_xor
the "binary_expression" category instead of "logical_binary_expression". As PHP also includes this node and it seems to be a logical operator there, you might use theactivated_for
field to use it only for PHP. That should be fine as long as we do not need to evaluate the category "binary_expression" for any metric. Assinging "binary_expression" for C++ and "logical_binary_expression" for PHP would require #231 which I do not think should be done before we actually need it.