c.tmbundle
c.tmbundle copied to clipboard
bitwise NOT operator did not get recognized properly when used with function and judging statement
Given the following code:
int main(){
int a, b;
fscanf(input, "%d", &b);
if(~fscanf(user_output, "%d", &a)) {
// ...
}
}
The ~fscanf part inconsistently displayed itself as purple, while when using other operators it displays black for operator and then blues for the function name:
int main(){
int a, b;
fscanf(input, "%d", &b);
if(fscanf(user_output, "%d", &a)) {
// ...
}
}
int main(){
int a, b;
fscanf(input, "%d", &b);
if(+fscanf(user_output, "%d", &a)) {
// ...
}
}
int main(){
int a, b;
fscanf(input, "%d", &b);
if(-fscanf(user_output, "%d", &a)) {
// ...
}
}
Even for bitwise XOR operator ^ the behavior stays the same:
int main(){
int a, b;
fscanf(input, "%d", &b);
if(^fscanf(user_output, "%d", &a)) {
// ...
}
}
I believe this caused inconsistency and should be fixed in the future.