Skip to content
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

enh(c,cpp) highlight type modifiers as type #3316

Merged
merged 4 commits into from Aug 30, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -3,6 +3,7 @@
enh(css/less/stylus/scss) improve consistency of function dispatch (#3301) [Josh Goebel][]
enh(css/less/stylus/scss) detect block comments more fully (#3301) [Josh Goebel][]
- fix(cpp) fix `xor_eq` keyword highlighting. [Denis Kovalchuk][]
- enh(c,cpp) highlight type modifiers as type (#3316) [Josh Goebel][]

[Josh Goebel]: https://github.com/joshgoebel
[Denis Kovalchuk]: https://github.com/deniskovalchuk
Expand Down
5 changes: 3 additions & 2 deletions src/languages/c.js
Expand Up @@ -116,7 +116,6 @@ export default function(hljs) {
"auto",
"break",
"case",
"const",
"continue",
"default",
"do",
Expand All @@ -132,7 +131,6 @@ export default function(hljs) {
"restrict",
"return",
"sizeof",
"static",
"struct",
"switch",
"typedef",
Expand Down Expand Up @@ -172,6 +170,9 @@ export default function(hljs) {
"_Decimal32",
"_Decimal64",
"_Decimal128",
// modifiers
"const",
"static",
// aliases
"complex",
"bool",
Expand Down
10 changes: 5 additions & 5 deletions src/languages/cpp.js
Expand Up @@ -128,7 +128,6 @@ export default function(hljs) {
'co_yield',
'compl',
'concept',
'const',
'const_cast|10',
'consteval',
'constexpr',
Expand Down Expand Up @@ -172,9 +171,7 @@ export default function(hljs) {
'reinterpret_cast|10',
'requires',
'return',
'signed',
'sizeof',
'static',
'static_assert',
'static_cast|10',
'struct',
Expand All @@ -192,7 +189,6 @@ export default function(hljs) {
'typeid',
'typename',
'union',
'unsigned',
'using',
'virtual',
'volatile',
Expand All @@ -214,7 +210,11 @@ export default function(hljs) {
'long',
'short',
'void',
'wchar_t'
'wchar_t',
'unsigned',
'signed',
'const',
'static'
];

const TYPE_HINTS = [
Expand Down