Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ You can install this bundle in TextMate by opening the preferences and going to

# General

* [Bundle Styleguide](http://kb.textmate.org/bundle_styleguide) — _before you make changes_
* [Commit Styleguide](http://kb.textmate.org/commit_styleguide) — _before you send a pull request_
* [Writing Bug Reports](http://kb.textmate.org/writing_bug_reports) — _before you report an issue_
* [Bundle Styleguide](http://kb.textmate.org/bundle_styleguide) — _before you make changes_ (inactive, see [archive](https://web.archive.org/web/20180523122000/http://wiki.macromates.com/Bundles/StyleGuide))
* [Commit Styleguide](http://kb.textmate.org/commit_styleguide) — _before you send a pull request_ (inactive)
* [Writing Bug Reports](http://kb.textmate.org/writing_bug_reports) — _before you report an issue_ (inactive, see [here](https://github.com/textmate/textmate/wiki/writing-bug-report) for active page)

# License

Expand Down
25 changes: 20 additions & 5 deletions Syntaxes/C++.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<array>
<string>cc</string>
<string>cpp</string>
<string>cppm</string>
<string>cp</string>
<string>cxx</string>
<string>c++</string>
Expand All @@ -17,6 +18,8 @@
<string>hpp</string>
<string>hxx</string>
<string>h++</string>
<string>ixx</string>
<string>mxx</string>
</array>
<key>firstLineMatch</key>
<string>-\*- C\+\+ -\*-</string>
Expand Down Expand Up @@ -88,7 +91,7 @@
</dict>
<dict>
<key>match</key>
<string>\b(catch|operator|try|throw|using)\b</string>
<string>\b(atomic_cancel|atomic_commit|atomic_noexcept|catch|contract_assert|operator|pre|post|synchronized|transaction_safe|transaction_safe_dynamic|try|throw|using)\b</string>
<key>name</key>
<string>keyword.control.c++</string>
</dict>
Expand All @@ -108,7 +111,13 @@
</dict>
<dict>
<key>match</key>
<string>\b(this|nullptr)\b</string>
<string>\b(nullopt)\b</string>
<key>name</key>
<string>constant.language.c++</string>
</dict>
<dict>
<key>match</key>
<string>\b(this)\b</string>
<key>name</key>
<string>variable.language.c++</string>
</dict>
Expand All @@ -126,22 +135,28 @@
</dict>
<dict>
<key>match</key>
<string>\b(co_await|co_return|co_yield|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq)\b</string>
<string>\b(and|and_eq|bitand|bitor|co_await|co_return|co_yield|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq)\b</string>
<key>name</key>
<string>keyword.operator.c++</string>
</dict>
<dict>
<key>match</key>
<string>\b(class|wchar_t|char8_t|char16_t|char32_t)\b</string>
<string>\b(class)\b</string>
<key>name</key>
<string>storage.type.c++</string>
</dict>
<dict>
<key>match</key>
<string>\b(consteval|constinit|constexpr|export|mutable|typename|thread_local|noexcept|final|override)\b</string>
<string>\b(alignas|alignof|consteval|constinit|decltype|final|mutable|noexcept|override|reflexpr|requires|typename)\b</string>
<key>name</key>
<string>storage.modifier.c++</string>
</dict>
<dict>
<key>match</key>
<string>\b(import|export|module)\b</string>
<key>name</key>
<string>keyword.module.c++</string>
</dict>
<dict>
<key>begin</key>
<string>(?x)
Expand Down
32 changes: 15 additions & 17 deletions Syntaxes/C.plist
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,27 @@
<key>include</key>
<string>#comments</string>
</dict>
<dict>
<key>include</key>
<string>source.c.platform</string>
</dict>
<dict>
<key>match</key>
<string>\b(break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while)\b</string>
<string>\b(assert|break|case|continue|countof|_Countof|default|defined|do|else|for|goto|if|_Pragma|return|sizeof|static_assert|_Static_assert|switch|typeof|typeof_unqual|while)\b</string>
<key>name</key>
<string>keyword.control.c</string>
</dict>
<dict>
<key>match</key>
<string>\b(asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\b</string>
<string>\b(_Atomic|asm|__asm__|auto|_BitInt|bool|_Bool|char|complex|_Complex|_Decimal32|_Decimal64|_Decimal128|double|enum|float|fortran|__fortran__|_Generic|imaginary|_Imaginary|int|long|_Noreturn|short|signed|struct|typedef|union|unsigned|void)\b</string>
<key>name</key>
<string>storage.type.c</string>
</dict>
<dict>
<key>match</key>
<string>\b(const|extern|register|restrict|static|volatile|inline)\b</string>
<string>\b(?:(?:u?int|char(?:8|16|32)|wchar|float(?:16|32|64|128)|bfloat16)_t|[uif](?:8|16|32|64|128)|bf16)\b</string>
<key>name</key>
<string>storage.typealias.c</string>
</dict>
<dict>
<key>match</key>
<string>\b(alignas|_Alignas|alignof|_Alignof|const|constexpr|extern|register|restrict|static|thread_local|_Thread_local|volatile|inline)\b</string>
<key>name</key>
<string>storage.modifier.c</string>
</dict>
Expand All @@ -75,7 +77,7 @@
</dict>
<dict>
<key>match</key>
<string>\b(NULL|true|false|TRUE|FALSE)\b</string>
<string>\b(NULL|nullptr|true|false|TRUE|FALSE)\b</string>
<key>name</key>
<string>constant.language.c</string>
</dict>
Expand Down Expand Up @@ -271,7 +273,7 @@
</dict>
<dict>
<key>begin</key>
<string>^\s*#\s*(include|import)\b</string>
<string>^\s*#\s*(embed|include|import)\b</string>
<key>captures</key>
<dict>
<key>1</key>
Expand Down Expand Up @@ -348,7 +350,7 @@
</dict>
<dict>
<key>begin</key>
<string>^\s*#\s*(define|defined|elif|else|if|ifdef|ifndef|line|pragma|undef)\b</string>
<string>^\s*#\s*(define|defined|elif|elifdef|elifndef|else|if|ifdef|ifndef|line|pragma|undef)\b</string>
<key>captures</key>
<dict>
<key>1</key>
Expand Down Expand Up @@ -392,7 +394,7 @@
| (?= \s*[A-Za-z_] ) (?&lt;!&amp;&amp;) (?&lt;=[*&amp;&gt;]) # or type modifier before name
)
)
(\s*) (?!(while|for|do|if|else|switch|catch|enumerate|return|sizeof|[cr]?iterate|(?:::)?new|(?:::)?delete)\s*\()
(\s*) (?!(while|for|do|if|else|switch|catch|enumerate|return|sizeof|assert|[cr]?iterate|(?:::)?new|(?:::)?delete)\s*\()
(
(?: [A-Za-z_][A-Za-z0-9_]*+ | :: )++ | # actual name
(?: (?&lt;=operator) (?: [-*&amp;&lt;&gt;=+!]+ | \(\) | \[\] ) ) # if it is a C++ operator
Expand Down Expand Up @@ -432,7 +434,7 @@
</dict>
<dict>
<key>match</key>
<string>\b(const|final|override|noexcept)\b</string>
<string>\b(const|constexpr|final|override|noexcept)\b</string>
<key>name</key>
<string>storage.modifier.$1.c++</string>
</dict>
Expand Down Expand Up @@ -531,10 +533,6 @@
<key>include</key>
<string>#access</string>
</dict>
<dict>
<key>include</key>
<string>source.c.platform#functions</string>
</dict>
<dict>
<key>include</key>
<string>#c_function_call</string>
Expand Down Expand Up @@ -601,7 +599,7 @@
<key>match</key>
<string>(?x) (?: (?= \s ) (?:(?&lt;=else|new|return) | (?&lt;!\w)) (\s+))?
(\b
(?!(while|for|do|if|else|switch|catch|enumerate|return|sizeof|[cr]?iterate|(?:::)?new|(?:::)?delete)\s*\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\b | :: )++ # actual name
(?!(while|for|do|if|else|switch|catch|enumerate|return|sizeof|assert|[cr]?iterate|(?:::)?new|(?:::)?delete)\s*\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\b | :: )++ # actual name
)
\s*(\()</string>
<key>name</key>
Expand Down
Loading