Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/treetrek.git
render/LanguageDefinitions.php
],
'c' => [
- 'string' => '/' . $str . '/',
- 'comment' => '/(\/\/[^\r\n]*|\/\*.*?\*\/)/ms',
- 'keyword' => '/\b(auto|break|case|const|continue|default|do|else|enum|extern|for|goto|if|register|return|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/',
- 'type' => '/\b(char|double|float|int|long|short|void)\b/',
- 'function' => '/\b([a-zA-Z_][a-zA-Z0-9_]*)\s*(?=\()/',
- 'number' => '/' . $int . '/',
+ 'string' => '/' . $str . '/',
+ 'comment' => '/(\/\/[^\r\n]*|\/\*.*?\*\/)/ms',
+ 'preprocessor' => '/(^\s*#[^\r\n]*)/',
+ 'keyword' => '/\b(auto|break|case|const|continue|default|do|else|enum|extern|for|goto|if|register|return|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/',
+ 'type' => '/\b(char|double|float|int|long|short|void)\b/',
+ 'function' => '/\b([a-zA-Z_][a-zA-Z0-9_]*)\s*(?=\()/',
+ 'number' => '/' . $int . '/',
],
'cpp' => [
- 'string' => '/' . $str . '/',
- 'comment' => '/(\/\/[^\r\n]*|\/\*.*?\*\/)/ms',
- 'keyword' => '/\b(alignas|alignof|and|and_eq|asm|auto|bitand|bitor|break|case|catch|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|goto|if|inline|mutable|namespace|new|noexcept|not|not_eq|nullptr|operator|or|or_eq|private|protected|public|register|reinterpret_cast|return|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|using|virtual|volatile|while|xor|xor_eq)\b/',
- 'type' => '/\b(bool|char|char16_t|char32_t|double|float|int|long|short|signed|unsigned|void|wchar_t)\b/',
- 'boolean' => '/\b(true|false)\b/',
- 'function' => '/\b([a-zA-Z_][a-zA-Z0-9_]*)\s*(?=\()/',
- 'number' => '/' . $int . '/',
+ 'string' => '/' . $str . '/',
+ 'comment' => '/(\/\/[^\r\n]*|\/\*.*?\*\/)/ms',
+ 'preprocessor' => '/(^\s*#[^\r\n]*)/',
+ 'keyword' => '/\b(alignas|alignof|and|and_eq|asm|auto|bitand|bitor|break|case|catch|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|goto|if|inline|mutable|namespace|new|noexcept|not|not_eq|nullptr|operator|or|or_eq|private|protected|public|register|reinterpret_cast|return|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|using|virtual|volatile|while|xor|xor_eq)\b/',
+ 'type' => '/\b(bool|char|char16_t|char32_t|double|float|int|long|short|signed|unsigned|void|wchar_t)\b/',
+ 'boolean' => '/\b(true|false)\b/',
+ 'function' => '/\b([a-zA-Z_][a-zA-Z0-9_]*)\s*(?=\()/',
+ 'number' => '/' . $int . '/',
],
'java' => [
repo.css
}
+.hl-preprocessor {
+ color: #ab9df2;
+}
+

Adds C preprocessor syntax

Author Dave Jarvis <email>
Date 2026-02-15 00:20:53 GMT-0800
Commit f7b4cd14212cc6e5519286403eea87bd74188353
Parent 45a03f4
Delta 19 lines added, 13 lines removed, 6-line increase