Skip to content

Commit

Permalink
enh(cpp) add flat_map and flat_set c++23 new features (#4127)
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlavan authored Oct 2, 2024
1 parent ff3985d commit 81e450f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Core Grammars:
- fix(typescript) - Fixedoptional property not highlighted correctly [Dxuian]
- fix(ruby) - fix `|=` operator false positives (as block arguments) [Aboobacker MK]
- fix(sql) - Fixed sql primary key and foreign key spacing issue [Dxuian]

- fix(cpp) added flat_set and flat_map as a part of cpp 23 version [Lavan]

New Grammars:

- added 3rd party TTCN-3 grammar to SUPPORTED_LANGUAGES [Osmocom][]
Expand Down Expand Up @@ -53,6 +54,7 @@ CONTRIBUTORS
[Sainan]: https://github.com/Sainan
[Osmocom]: https://github.com/osmocom
[Álvaro Mondéjar]: https://github.com/mondeja
[Lavan]: https://github.com/jvlavan


## Version 11.10.0
Expand Down
4 changes: 3 additions & 1 deletion src/languages/cpp.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ export default function(hljs) {
'counting_semaphore',
'deque',
'false_type',
'flat_map',
'flat_set',
'future',
'imaginary',
'initializer_list',
Expand Down Expand Up @@ -572,7 +574,7 @@ export default function(hljs) {
[
PREPROCESSOR,
{ // containers: ie, `vector <int> rooms (9);`
begin: '\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)',
begin: '\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)',
end: '>',
keywords: CPP_KEYWORDS,
contains: [
Expand Down

0 comments on commit 81e450f

Please sign in to comment.