Skip to content

Commit

Permalink
enh(c) add C23 keywords and types (#3836)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eisenwave committed Mar 21, 2024
1 parent 5fe035c commit e75b7e4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CAVEATS / POTENTIALLY BREAKING CHANGES

Core Grammars:

- enh(c) added more C23 keywords and preprcoessor directives [Eisenwave][]
- enh(js/ts) support namespaced tagged template strings [Aral Balkan][]
- enh(perl) fix false-positive variable match at end of string [Josh Goebel][]
- fix(cpp) not all kinds of number literals are highlighted correctly [Lê Duy Quang][]
Expand Down Expand Up @@ -55,6 +56,7 @@ Themes:

- Added `1c-light` theme a like in the IDE 1C:Enterprise 8 (for 1c) [Vitaly Barilko][]

[Eisenwave]: https://github.com/Eisenwave
[Aral Balkan]: https://github.com/aral
[Lê Duy Quang]: https://github.com/leduyquang753
[Mohamed Ali]: https://github.com/MohamedAli00949
Expand Down Expand Up @@ -134,7 +136,6 @@ Core Grammars:
- fix(css) added '_' css variable detection [Md Saad Akhtar][]
- enh(groovy) add `record` and `var` as keywords [Guillaume Laforge][]


Developer Tool:

- (chore) Update dev tool to use the new `highlight` API. [Shah Shabbir Ahmmed][]
Expand Down
14 changes: 13 additions & 1 deletion src/languages/c.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function(hljs) {
end: /$/,
keywords: { keyword:
'if else elif endif define undef warning error line '
+ 'pragma _Pragma ifdef ifndef include' },
+ 'pragma _Pragma ifdef ifndef elifdef elifndef include' },
contains: [
{
begin: /\\\n/,
Expand Down Expand Up @@ -148,14 +148,26 @@ export default function(hljs) {
"char",
"void",
"_Bool",
"_BitInt",
"_Complex",
"_Imaginary",
"_Decimal32",
"_Decimal64",
"_Decimal96",
"_Decimal128",
"_Decimal64x",
"_Decimal128x",
"_Float16",
"_Float32",
"_Float64",
"_Float128",
"_Float32x",
"_Float64x",
"_Float128x",
// modifiers
"const",
"static",
"constexpr",
// aliases
"complex",
"bool",
Expand Down

0 comments on commit e75b7e4

Please sign in to comment.