-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CppLexer: complex, _Imaginary and atomic_ colorization missing? #906
Comments
(Original comment by birkenfeld on 2016-02-02T09:51:44.081719+00:00) A PR would be nice. Since |
(Original comment by endorama on 2016-03-03T22:27:11.728301+00:00) I'm not at all proficient with C/C++ to know this informations, but some research seems to suggest that:
If it's ok to proceed I'm going to submit the PR. Thank you. |
(Original comment by tshatch on 2016-06-01T01:47:30.235399+00:00) Yes, please, send a PR. |
Add support for C11 atomic types `atomic_*`.
* General improvement to the C/C++ lexer * Add missing C11 keywords Add '_Imaginary', '_Static_assert', '_Atomic' keywords. * Highlight C11 std atomic types (#906) Add support for C11 atomic types `atomic_*`. * Extended character literals prefixes for C/C++ Add support for `u'a'`, `U'a'` (C++11, C11), and `u8'a'` (C++17, C2x). [Reference](https://en.cppreference.com/w/cpp/language/character_literal). [Reference](https://en.cppreference.com/w/c/language/character_constant). * Fix bad floating point highlighting in C lexer Fix bad highlighting for `5.`, where `.` was not highlighted. * Fix hex floating literal highlighting in C Hexadecimal floating point literals needs an exponent (`0x5p8`). Before this commit, event floating-point literals without an exponent were accepted (e.g. `0x5.5`). * Support '$' in identifiers, C/C++ Some old C/C++ compilers have supported `$` (dollar sign) in identifiers, and some news continue to support this for legacy reasons. That is, some codes may use them, and it is therefore preferable to color them correctly. * Cleaning and fixing some bugs in C/C++ lexer - Add '_Pragma' keyword - Recognize the identifier following 'typename' as Name.Class - Do not tokenize 'class' or 'struct' following 'enum' as Name.Class, but instead as Keyword (C++ lexer) - Move some C++ keywords to the generic lexer (`alignas`, `alignof`, etc...) - Add some C keywords (`noreturn`, `imaginary`, `complex`) - And others things... * Fix building errors in C/C++ lexer * Fix bug in C/C++ Now `class`, `struct`, `enum`, `union`, etc... can be used alone. Previously, the lexer do not recognizes them if they are not followed by an identifier. This regression was introduced in 013bf6a by me. * Reuse old states names for C/C++ Some lexers depends on the old states names (e.g. `classname` state) to works. This commit, reintroduce these old names. * Improve C/C++ lexer documentation * Correct english errors in C lexer documentation * Cleaning and Unicode literals for C * Move Unicode literals from C++ to generic C * Remove useless 'classname' state in ECLexer * Revert "Remove useless 'classname' state in ECLexer" This reverts commit 89a0c13. * Revert "Revert "Remove useless 'classname' state in ECLexer"" This reverts commit 2d47343. * Add support for UCNs in C and C++ * Apply correction from #1162 Solves #1162 * Correctly highlights negatives numbers in C++ * Revert some changes from 8fe8ed6 * Add unicode suffixes to C++ raw string literals * Solves #1166 * Fix previous regression in C like lexer * Fix invalid regex in C like lexer * Fix #1396 and now are identifiers support UCNs in C and C++ lexer * Update AUTHORS * Add missing Python raw string prefix Co-authored-by: Hubert Gruniaux <42495291+HubertGruniaux@users.noreply.github.com>
Fixed by #1350 |
(Original issue 1199 created by endorama on 2016-01-26T15:06:29.389443+00:00)
Hello, I have found what I think is a wrong behaviour of the CppLexer.
complex
,_Imaginary
andatomic_*
are not highlighted in any way, see attached screenshot. Is this the expected behaviour? In case it is not, I can submit a PR to fix this.Thank you!
The text was updated successfully, but these errors were encountered: