Skip to content

support of C++23 and C23

jonathan poelen requested to merge jpoelen/syntax-highlighting:c into master

C++:

New styles:

  • String Literal Prefix
  • Char Literal Prefix
U"..."
^ String Literal Prefix
 ^ String

U'...'
^ Char Literal Prefix
 ^ Char

Some changes:

"\xaaa"
     ^ now Error

09
^ now Decimal
 ^ Error

"abc\
    ^ now Separator Symbol

Optimization:

Test performed with time kate-syntax-highlighter --output-format=ansi256colors:

For a file with 29k rows made of arrays with a lot of chars and integers (most of them 0)

before: 670ms
after:  380ms

For src/lib/definition.cpp duplicated 114 times (~100k lines)

before: 830ms
after:  530ms

C:

New styles:

  • Attribute
  • Standard Attribute
  • String Literal Prefix
  • Char Literal Prefix

large part taken from cpp.xml.

Merge request reports

Loading