diff --git a/CHANGES.md b/CHANGES.md index 8a42a86249..147e39a540 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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][] @@ -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 @@ -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][] diff --git a/src/languages/c.js b/src/languages/c.js index 227927913f..cb7f51dbe4 100644 --- a/src/languages/c.js +++ b/src/languages/c.js @@ -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/, @@ -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",