mc/misc/syntax/c.syntax
Dmitry Atamanov 9fb4261334 mcedit: update C and C++ syntax highlightings.
Closes MidnightCommander/mc#195.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:01:47 +03:00

134 lines
4.2 KiB
YAML
Raw Blame History

# Syntax rules for the C and the C++ programming languages
context default
keyword whole alignas yellow
keyword whole alignof yellow
keyword whole asm yellow
keyword whole auto yellow
keyword whole break yellow
keyword whole case yellow
keyword whole char yellow
keyword whole constexpr yellow
keyword whole const yellow
keyword whole continue yellow
keyword whole default yellow
keyword whole double yellow
keyword whole do yellow
keyword whole else yellow
keyword whole enum yellow
keyword whole extern yellow
keyword whole false yellow
keyword whole float yellow
keyword whole for yellow
keyword whole goto yellow
keyword whole if yellow
keyword whole inline yellow
keyword whole int yellow
keyword whole long yellow
keyword whole nullptr yellow
keyword whole register yellow
keyword whole restrict yellow
keyword whole return yellow
keyword whole short yellow
keyword whole signed yellow
keyword whole sizeof yellow
keyword whole static yellow
keyword whole static_assert yellow
keyword whole struct yellow
keyword whole switch yellow
keyword whole thread_local yellow
keyword whole true yellow
keyword whole typedef yellow
keyword whole typeof yellow
keyword whole typeof_unqual yellow
keyword whole union yellow
keyword whole unsigned yellow
keyword whole void yellow
keyword whole volatile yellow
keyword whole wchar_t yellow
keyword whole while yellow
keyword whole _Alignas yellow
keyword whole _Alignof yellow
keyword whole _Atomic yellow
keyword whole _Bool yellow
keyword whole _Complex yellow
keyword whole _Decimal32 yellow
keyword whole _Decimal64 yellow
keyword whole _Decimal128 yellow
keyword whole _Generic yellow
keyword whole _Imaginary yellow
keyword whole _Noreturn yellow
keyword whole _Static_assert yellow
keyword whole _Thread_local yellow
keyword whole ... yellow
keyword linestart \{\s\t\}\[\s\t\]#*\n brightmagenta
keyword whole \[\s\t\]default yellow
keyword whole linestart \[\s\t\]\{ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\}\[0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\]: cyan
keyword /\* brown
keyword \*/ brown
keyword // brown
keyword '\\\{"abtnvfr\}' brightgreen
keyword '\\\{0123\}\{01234567\}\{01234567\}' brightgreen
keyword '\\'' brightgreen
keyword '\\\\' brightgreen
keyword '\\0' brightgreen
keyword '\{\s!"#$%&()\*\+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~<7E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\}' brightgreen
# punctuation characters, sorted by ASCII code
keyword ! yellow
keyword % yellow
keyword && yellow
keyword & brightmagenta
keyword ( brightcyan
keyword ) brightcyan
keyword \* yellow
keyword \+ yellow
keyword , brightcyan
keyword - yellow
keyword / yellow
keyword : brightcyan
keyword ; brightmagenta
keyword < yellow
keyword = yellow
keyword > yellow
keyword ? brightcyan
keyword [ brightcyan
keyword ] brightcyan
keyword ^ brightmagenta
keyword { brightcyan
keyword || yellow
keyword | brightmagenta
keyword } brightcyan
keyword ~ brightmagenta
context exclusive /\* \*/ brown
spellcheck
context exclusive // \n brown
spellcheck
context linestart # \n brightred
keyword \\\n yellow
keyword /\**\*/ brown
keyword //*\n brown
keyword "+" red
keyword <+> red
context " " green
spellcheck
keyword \\" brightgreen
keyword %% brightgreen
keyword %\[#0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[L\]\{eEfgGoxX\} brightgreen
keyword %\[0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[hl\]\{diuxX\} brightgreen
keyword %\[hl\]n brightgreen
keyword %\[-\]\[0123456789\*\]\[.\]\[0123456789\*\]s brightgreen
keyword %[*] brightgreen
keyword %c brightgreen
keyword %p brightgreen
keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
keyword \\\\ brightgreen
keyword \\' brightgreen
keyword \\\{abtnvfr\} brightgreen