C++ "and", "or" keywords highlighting not working properly

Question:
Is there a way to make replit c++ highlighting to highlight the keywords “and”, “or”?
Repl link:

The following code highlights correctly

if( min_salary < salary && salary < 3*min_salary){
	cout << "tax is 15%: " << salary/100 *15 << endl;
}

However, if i use the keywords “and”, “or”, it highlights the next word instead of the “and”, “or”

if( min_salary < salary and salary < 3*min_salary){
	cout << "tax is 15%: " << salary/100 *15 << endl;
}
1 Like

I would recommend not using and and or in the first place, as it is not very professional. Personally, I just stick to || and &&.

Here’s a graph of all of the C++ abbreviations that I know:

+--------------+-----------+
| Alternative  |  Primary  |
+--------------+-----------+
|    <%        |    {      |
|    %>        |    }      |
|    <:        |    [      |
|    :>        |    ]      |
|    %:        |    #      |
|    %:%:      |    ##     |
|    and       |    &&     |
|    bitor     |    |      |
|    or        |    ||     |
|    xor       |    ^      |
|    compl     |    ~      |
|    bitand    |    &      |
|    and_eq    |    &=     |
|    or_eq     |    |=     |
|    xor_eq    |    ^=     |
|    not       |    !      |
|    not_eq    |    !=     |
+--------------+-----------+