Open Melkor-1 opened 1 month ago
Describe the issue
C23 has added digit specifiers to the language (', just like C++). They are not highlighted correctly in the code. It seems as if the engine treats it as the start of a string/character
'
Which language seems to have the issue? c
c
Are you using highlight or highlightAuto?
highlight
highlightAuto
Whichever one StackExchange uses.
Sample Code to Reproduce
#define _POSIX_C_SOURCE 200'809L #define _XOPEN_SOURCE 700
Expected behavior
It should recognize it as a digit separator instead of a character or a string opening quote.
Additional context
This was found at this code review post: https://codereview.stackexchange.com/revisions/292149/6
And it was fixed by such a hack:
#define _POSIX_C_SOURCE 200'809L // '
Does our C++ grammar properly support this already. If so might be an easy port.
Describe the issue
C23 has added digit specifiers to the language (
'
, just like C++). They are not highlighted correctly in the code. It seems as if the engine treats it as the start of a string/characterWhich language seems to have the issue?
c
Are you using
highlight
orhighlightAuto
?Whichever one StackExchange uses.
Sample Code to Reproduce
Expected behavior
It should recognize it as a digit separator instead of a character or a string opening quote.
Additional context
This was found at this code review post: https://codereview.stackexchange.com/revisions/292149/6
And it was fixed by such a hack: