Skip to content

Commit 527086f

Browse files
authored
enh(cpp) Recognize priority_queue, pair as containers (#2541)
1 parent 8c74229 commit 527086f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Language Improvements:
2626
- enh(typescript) add setInterval, setTimeout, clearInterval, clearTimeout (#2514) [Josh Goebel][]
2727
- enh(javascript) add setInterval, setTimeout, clearInterval, clearTimeout (#2514) [Vania Kucher][]
2828
- enh(cpp) add `pair`, `make_pair`, `priority_queue` as built-ins (#2538) [Hankun Lin][]
29+
- enh(cpp) recognize `priority_queue` `pair` as cpp containers (#2541) [Hankun Lin][]
2930
- fix(javascript) prevent `set` keyword conflicting with setTimeout, etc. (#2514) [Vania Kucher][]
3031
- fix(cpp) Fix highlighting of unterminated raw strings (#2261) [David Benjamin][]
3132
- fix(javascript) `=>` function with nested `()` in params now works (#2502) [Josh Goebel][]

src/languages/c-like.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ export default function(hljs) {
212212
EXPRESSION_CONTAINS,
213213
[
214214
PREPROCESSOR,
215-
{
216-
begin: '\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<', end: '>',
215+
{ // containers: ie, `vector <int> rooms (9);`
216+
begin: '\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<', end: '>',
217217
keywords: CPP_KEYWORDS,
218218
contains: ['self', CPP_PRIMITIVE_TYPES]
219219
},

0 commit comments

Comments
 (0)