Skip to content
Browse files

Added highlighting for C++ inheritance.

Added highlighting for C++ multiple inheritance,
many thanks to Infininight for help here!

New pref for excluding inheritance syms
  • Loading branch information...
1 parent 4f8abd6 commit 1ee17534b06ffa4bf9bc0ff3fc624ef231d3b455 @dhowden dhowden committed with infininight
Showing with 48 additions and 1 deletion.
  1. +19 −0 Preferences/Symbol List: Exclude class inheritance.tmPreferences
  2. +29 −1 Syntaxes/C++.plist
View
19 Preferences/Symbol List: Exclude class inheritance.tmPreferences
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>bundleUUID</key>
+ <string>4675A940-6227-11D9-BFB1-000D93589AF6</string>
+ <key>name</key>
+ <string>Symbol List: Exclude class inheritance</string>
+ <key>scope</key>
+ <string>entity.name.type.inherited.c++</string>
+ <key>settings</key>
+ <dict>
+ <key>showInSymbolList</key>
+ <integer>0</integer>
+ </dict>
+ <key>uuid</key>
+ <string>DA926AFF-E231-4036-9197-AFD6E314A0DC</string>
+</dict>
+</plist>
View
30 Syntaxes/C++.plist
@@ -415,7 +415,7 @@
</dict>
<dict>
<key>begin</key>
- <string>\b(class|struct)\b\s*([_A-Za-z][_A-Za-z0-9]*\b)?+</string>
+ <string>\b(class|struct)\b\s*([_A-Za-z][_A-Za-z0-9]*\b)?+(\s*:\s*(public|protected|private)\s*([_A-Za-z][_A-Za-z0-9]*\b)((\s*,\s*(public|protected|private)\s*[_A-Za-z][_A-Za-z0-9]*\b)*))?</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
@@ -428,6 +428,34 @@
<key>name</key>
<string>entity.name.type.c++</string>
</dict>
+ <key>4</key>
+ <dict>
+ <key>name</key>
+ <string>storage.type.modifier.c++</string>
+ </dict>
+ <key>5</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.type.inherited.c++</string>
+ </dict>
+ <key>6</key>
+ <dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>(public|protected|private)</string>
+ <key>name</key>
+ <string>storage.type.modifier.c++</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>[_A-Za-z][_A-Za-z0-9]*</string>
+ <key>name</key>
+ <string>entity.name.type.inherited.c++</string>
+ </dict>
+ </array>
+ </dict>
</dict>
<key>end</key>
<string>(?&lt;=\})|(?=(;|\(|\)|&gt;|\[|\]|=))</string>

0 comments on commit 1ee1753

Please sign in to comment.
Something went wrong with that request. Please try again.