Last active
August 29, 2015 14:11
-
-
Save wsfulton/b24e590d2739e9bb866f to your computer and use it in GitHub Desktop.
SWIG Lingua
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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>comment</key> | |
| <string>I don't think anyone uses .hp. .cp tends to be paired with .h. (I could be wrong. :) -- chris</string> | |
| <key>fileTypes</key> | |
| <array> | |
| <string>cc</string> | |
| <string>cpp</string> | |
| <string>cp</string> | |
| <string>cxx</string> | |
| <string>c++</string> | |
| <string>C</string> | |
| <string>h</string> | |
| <string>hh</string> | |
| <string>hpp</string> | |
| <string>h++</string> | |
| </array> | |
| <key>firstLineMatch</key> | |
| <string>-\*- C\+\+ -\*-</string> | |
| <key>keyEquivalent</key> | |
| <string>^~C</string> | |
| <key>name</key> | |
| <string>C++</string> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>include</key> | |
| <string>#special_block</string> | |
| </dict> | |
| <dict> | |
| <key>include</key> | |
| <string>source.c</string> | |
| </dict> | |
| <dict> | |
| <key>match</key> | |
| <string>\b(friend|explicit|virtual)\b</string> | |
| <key>name</key> | |
| <string>storage.modifier.$1.c++</string> | |
| </dict> | |
| <dict> | |
| <key>match</key> | |
| <string>\b(private|protected|public):</string> | |
| <key>name</key> | |
| <string>storage.modifier.$1.c++</string> | |
| </dict> | |
| <dict> | |
| <key>match</key> | |
| <string>\b(catch|operator|try|throw|using)\b</string> | |
| <key>name</key> | |
| <string>keyword.control.c++</string> | |
| </dict> | |
| <dict> | |
| <key>match</key> | |
| <string>\bdelete\b(\s*\[\])?|\bnew\b(?!])</string> | |
| <key>name</key> | |
| <string>keyword.control.c++</string> | |
| </dict> | |
| <dict> | |
| <key>comment</key> | |
| <string>common C++ instance var naming idiom -- fMemberName</string> | |
| <key>match</key> | |
| <string>\b(f|m)[A-Z]\w*\b</string> | |
| <key>name</key> | |
| <string>variable.other.readwrite.member.c++</string> | |
| </dict> | |
| <dict> | |
| <key>match</key> | |
| <string>\b(this|nullptr)\b</string> | |
| <key>name</key> | |
| <string>variable.language.c++</string> | |
| </dict> | |
| <dict> | |
| <key>match</key> | |
| <string>\btemplate\b\s*</string> | |
| <key>name</key> | |
| <string>storage.type.template.c++</string> | |
| </dict> | |
| <dict> | |
| <key>match</key> | |
| <string>\b(const_cast|dynamic_cast|reinterpret_cast|static_cast)\b\s*</string> | |
| <key>name</key> | |
| <string>keyword.operator.cast.c++</string> | |
| </dict> | |
| <dict> | |
| <key>match</key> | |
| <string>\b(and|and_eq|bitand|bitor|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)\b</string> | |
| <key>name</key> | |
| <string>storage.type.c++</string> | |
| </dict> | |
| <dict> | |
| <key>match</key> | |
| <string>\b(constexpr|export|mutable|typename|thread_local)\b</string> | |
| <key>name</key> | |
| <string>storage.modifier.c++</string> | |
| </dict> | |
| <dict> | |
| <key>begin</key> | |
| <string>(?x) | |
| (?: ^ # begin-of-line | |
| | (?: (?<!else|new|=) ) # or word + space before name | |
| ) | |
| ((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name | |
| \s*(\() # start bracket or end-of-line | |
| </string> | |
| <key>beginCaptures</key> | |
| <dict> | |
| <key>1</key> | |
| <dict> | |
| <key>name</key> | |
| <string>entity.name.function.c++</string> | |
| </dict> | |
| <key>2</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.definition.parameters.begin.c</string> | |
| </dict> | |
| </dict> | |
| <key>end</key> | |
| <string>\)</string> | |
| <key>endCaptures</key> | |
| <dict> | |
| <key>0</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.definition.parameters.end.c</string> | |
| </dict> | |
| </dict> | |
| <key>name</key> | |
| <string>meta.function.destructor.c++</string> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>include</key> | |
| <string>$base</string> | |
| </dict> | |
| </array> | |
| </dict> | |
| <dict> | |
| <key>begin</key> | |
| <string>(?x) | |
| (?: ^ # begin-of-line | |
| | (?: (?<!else|new|=) ) # or word + space before name | |
| ) | |
| ((?:[A-Za-z_][A-Za-z0-9_]*::)*+~[A-Za-z_][A-Za-z0-9_]*) # actual name | |
| \s*(\() # terminating semi-colon | |
| </string> | |
| <key>beginCaptures</key> | |
| <dict> | |
| <key>1</key> | |
| <dict> | |
| <key>name</key> | |
| <string>entity.name.function.c++</string> | |
| </dict> | |
| <key>2</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.definition.parameters.begin.c</string> | |
| </dict> | |
| </dict> | |
| <key>end</key> | |
| <string>\)</string> | |
| <key>endCaptures</key> | |
| <dict> | |
| <key>0</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.definition.parameters.end.c</string> | |
| </dict> | |
| </dict> | |
| <key>name</key> | |
| <string>meta.function.destructor.prototype.c++</string> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>include</key> | |
| <string>$base</string> | |
| </dict> | |
| </array> | |
| </dict> | |
| </array> | |
| <key>repository</key> | |
| <dict> | |
| <key>angle_brackets</key> | |
| <dict> | |
| <key>begin</key> | |
| <string><</string> | |
| <key>end</key> | |
| <string>></string> | |
| <key>name</key> | |
| <string>meta.angle-brackets.c++</string> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>include</key> | |
| <string>#angle_brackets</string> | |
| </dict> | |
| <dict> | |
| <key>include</key> | |
| <string>$base</string> | |
| </dict> | |
| </array> | |
| </dict> | |
| <key>block</key> | |
| <dict> | |
| <key>begin</key> | |
| <string>\{</string> | |
| <key>beginCaptures</key> | |
| <dict> | |
| <key>0</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.section.block.begin.c</string> | |
| </dict> | |
| </dict> | |
| <key>end</key> | |
| <string>\}</string> | |
| <key>endCaptures</key> | |
| <dict> | |
| <key>0</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.section.block.end.c</string> | |
| </dict> | |
| </dict> | |
| <key>name</key> | |
| <string>meta.block.c++</string> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>captures</key> | |
| <dict> | |
| <key>1</key> | |
| <dict> | |
| <key>name</key> | |
| <string>support.function.any-method.c</string> | |
| </dict> | |
| <key>2</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.definition.parameters.c</string> | |
| </dict> | |
| </dict> | |
| <key>match</key> | |
| <string>(?x) | |
| ( | |
| (?!while|for|do|if|else|switch|catch|enumerate|return|r?iterate)(?: \b[A-Za-z_][A-Za-z0-9_]*+\b | :: )*+ # actual name | |
| ) | |
| \s*(\()</string> | |
| <key>name</key> | |
| <string>meta.function-call.c</string> | |
| </dict> | |
| <dict> | |
| <key>include</key> | |
| <string>$base</string> | |
| </dict> | |
| </array> | |
| </dict> | |
| <key>constructor</key> | |
| <dict> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>begin</key> | |
| <string>(?x) | |
| (?: ^\s*) # begin-of-line | |
| ((?!while|for|do|if|else|switch|catch|enumerate|r?iterate)[A-Za-z_][A-Za-z0-9_:]*) # actual name | |
| \s*(\() # start bracket or end-of-line | |
| </string> | |
| <key>beginCaptures</key> | |
| <dict> | |
| <key>1</key> | |
| <dict> | |
| <key>name</key> | |
| <string>entity.name.function.c++</string> | |
| </dict> | |
| <key>2</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.definition.parameters.begin.c</string> | |
| </dict> | |
| </dict> | |
| <key>end</key> | |
| <string>\)</string> | |
| <key>endCaptures</key> | |
| <dict> | |
| <key>0</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.definition.parameters.end.c</string> | |
| </dict> | |
| </dict> | |
| <key>name</key> | |
| <string>meta.function.constructor.c++</string> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>include</key> | |
| <string>$base</string> | |
| </dict> | |
| </array> | |
| </dict> | |
| <dict> | |
| <key>begin</key> | |
| <string>(?x) | |
| (:) # begin-of-line | |
| ((?=\s*[A-Za-z_][A-Za-z0-9_:]* # actual name | |
| \s*(\())) # start bracket or end-of-line | |
| </string> | |
| <key>beginCaptures</key> | |
| <dict> | |
| <key>1</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.definition.parameters.c</string> | |
| </dict> | |
| </dict> | |
| <key>end</key> | |
| <string>(?=\{)</string> | |
| <key>name</key> | |
| <string>meta.function.constructor.initializer-list.c++</string> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>include</key> | |
| <string>$base</string> | |
| </dict> | |
| </array> | |
| </dict> | |
| </array> | |
| </dict> | |
| <key>special_block</key> | |
| <dict> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>begin</key> | |
| <string>\b(namespace)\b\s*([_A-Za-z][_A-Za-z0-9]*\b)?+</string> | |
| <key>beginCaptures</key> | |
| <dict> | |
| <key>1</key> | |
| <dict> | |
| <key>name</key> | |
| <string>storage.type.c++</string> | |
| </dict> | |
| <key>2</key> | |
| <dict> | |
| <key>name</key> | |
| <string>entity.name.type.c++</string> | |
| </dict> | |
| </dict> | |
| <key>captures</key> | |
| <dict> | |
| <key>1</key> | |
| <dict> | |
| <key>name</key> | |
| <string>keyword.control.namespace.$2</string> | |
| </dict> | |
| </dict> | |
| <key>end</key> | |
| <string>(?<=\})|(?=(;|,|\(|\)|>|\[|\]|=))</string> | |
| <key>name</key> | |
| <string>meta.namespace-block${2:+.$2}.c++</string> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>begin</key> | |
| <string>\{</string> | |
| <key>beginCaptures</key> | |
| <dict> | |
| <key>0</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.definition.scope.c++</string> | |
| </dict> | |
| </dict> | |
| <key>end</key> | |
| <string>\}</string> | |
| <key>endCaptures</key> | |
| <dict> | |
| <key>0</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.definition.scope.c++</string> | |
| </dict> | |
| </dict> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>include</key> | |
| <string>#special_block</string> | |
| </dict> | |
| <dict> | |
| <key>include</key> | |
| <string>#constructor</string> | |
| </dict> | |
| <dict> | |
| <key>include</key> | |
| <string>$base</string> | |
| </dict> | |
| </array> | |
| </dict> | |
| <dict> | |
| <key>include</key> | |
| <string>$base</string> | |
| </dict> | |
| </array> | |
| </dict> | |
| <dict> | |
| <key>begin</key> | |
| <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> | |
| <dict> | |
| <key>name</key> | |
| <string>storage.type.c++</string> | |
| </dict> | |
| <key>2</key> | |
| <dict> | |
| <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>(?<=\})|(?=(;|\(|\)|>|\[|\]|=))</string> | |
| <key>name</key> | |
| <string>meta.class-struct-block.c++</string> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>include</key> | |
| <string>#angle_brackets</string> | |
| </dict> | |
| <dict> | |
| <key>begin</key> | |
| <string>\{</string> | |
| <key>beginCaptures</key> | |
| <dict> | |
| <key>0</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.section.block.begin.c++</string> | |
| </dict> | |
| </dict> | |
| <key>end</key> | |
| <string>(\})(\s*\n)?</string> | |
| <key>endCaptures</key> | |
| <dict> | |
| <key>1</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.definition.invalid.c++</string> | |
| </dict> | |
| <key>2</key> | |
| <dict> | |
| <key>name</key> | |
| <string>invalid.illegal.you-forgot-semicolon.c++</string> | |
| </dict> | |
| </dict> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>include</key> | |
| <string>#special_block</string> | |
| </dict> | |
| <dict> | |
| <key>include</key> | |
| <string>#constructor</string> | |
| </dict> | |
| <dict> | |
| <key>include</key> | |
| <string>$base</string> | |
| </dict> | |
| </array> | |
| </dict> | |
| <dict> | |
| <key>include</key> | |
| <string>$base</string> | |
| </dict> | |
| </array> | |
| </dict> | |
| <dict> | |
| <key>begin</key> | |
| <string>\b(extern)(?=\s*")</string> | |
| <key>beginCaptures</key> | |
| <dict> | |
| <key>1</key> | |
| <dict> | |
| <key>name</key> | |
| <string>storage.modifier.c++</string> | |
| </dict> | |
| </dict> | |
| <key>end</key> | |
| <string>(?<=\})|(?=\w)</string> | |
| <key>name</key> | |
| <string>meta.extern-block.c++</string> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>begin</key> | |
| <string>\{</string> | |
| <key>beginCaptures</key> | |
| <dict> | |
| <key>0</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.section.block.begin.c</string> | |
| </dict> | |
| </dict> | |
| <key>end</key> | |
| <string>\}</string> | |
| <key>endCaptures</key> | |
| <dict> | |
| <key>0</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.section.block.end.c</string> | |
| </dict> | |
| </dict> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>include</key> | |
| <string>#special_block</string> | |
| </dict> | |
| <dict> | |
| <key>include</key> | |
| <string>$base</string> | |
| </dict> | |
| </array> | |
| </dict> | |
| <dict> | |
| <key>include</key> | |
| <string>$base</string> | |
| </dict> | |
| </array> | |
| </dict> | |
| </array> | |
| </dict> | |
| </dict> | |
| <key>scopeName</key> | |
| <string>source.c++</string> | |
| <key>uuid</key> | |
| <string>26251B18-6B1D-11D9-AFDB-000D93589AF6</string> | |
| </dict> | |
| </plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment