diff options
author | Benjamin Pasero <benjpas@microsoft.com> | 2015-11-13 20:26:13 +0300 |
---|---|---|
committer | Benjamin Pasero <benjpas@microsoft.com> | 2015-11-13 20:26:13 +0300 |
commit | d6f4873641e871de0894191c5689c75d92c6f60e (patch) | |
tree | 208d084fd3ec1c6106c022d89d8646dd3b98b1d6 | |
parent | d4403dc6d4994bdb8b95f9402c5312dcc49620b2 (diff) | |
parent | ef99de7936d45c4199fa51b5654130dafefabe68 (diff) |
Merge branch 'master' into noupdaterelease/0.10.1-extensionbuilders0.10.1-extensionbuilders
-rw-r--r-- | extensions/python/package.json | 3 | ||||
-rw-r--r-- | extensions/python/syntaxes/Regular Expressions (Python).tmLanguage | 299 | ||||
-rw-r--r-- | npm-shrinkwrap.json | 6 | ||||
-rw-r--r-- | package.json | 2 |
4 files changed, 306 insertions, 4 deletions
diff --git a/extensions/python/package.json b/extensions/python/package.json index 4dc79883946..5d178ef1c65 100644 --- a/extensions/python/package.json +++ b/extensions/python/package.json @@ -15,6 +15,9 @@ "language": "python", "scopeName": "source.python", "path": "./syntaxes/Python.tmLanguage" + },{ + "scopeName": "source.regexp.python", + "path": "./syntaxes/Regular Expressions (Python).tmLanguage" }] } }
\ No newline at end of file diff --git a/extensions/python/syntaxes/Regular Expressions (Python).tmLanguage b/extensions/python/syntaxes/Regular Expressions (Python).tmLanguage new file mode 100644 index 00000000000..80226aaecfa --- /dev/null +++ b/extensions/python/syntaxes/Regular Expressions (Python).tmLanguage @@ -0,0 +1,299 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>comment</key> + <string>Matches Python's regular expression syntax.</string> + <key>fileTypes</key> + <array> + <string>re</string> + </array> + <key>foldingStartMarker</key> + <string>(/\*|\{|\()</string> + <key>foldingStopMarker</key> + <string>(\*/|\}|\))</string> + <key>name</key> + <string>Regular Expressions (Python)</string> + <key>patterns</key> + <array> + <dict> + <key>match</key> + <string>\\[bBAZzG]|\^|\$</string> + <key>name</key> + <string>keyword.control.anchor.regexp</string> + </dict> + <dict> + <key>match</key> + <string>\\[1-9][0-9]?</string> + <key>name</key> + <string>keyword.other.back-reference.regexp</string> + </dict> + <dict> + <key>match</key> + <string>[?+*][?+]?|\{(\d+,\d+|\d+,|,\d+|\d+)\}\??</string> + <key>name</key> + <string>keyword.operator.quantifier.regexp</string> + </dict> + <dict> + <key>match</key> + <string>\|</string> + <key>name</key> + <string>keyword.operator.or.regexp</string> + </dict> + <dict> + <key>begin</key> + <string>\(\?\#</string> + <key>end</key> + <string>\)</string> + <key>name</key> + <string>comment.block.regexp</string> + </dict> + <dict> + <key>comment</key> + <string>We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.</string> + <key>match</key> + <string>(?<=^|\s)#\s[[a-zA-Z0-9,. \t?!-:][^\x{00}-\x{7F}]]*$</string> + <key>name</key> + <string>comment.line.number-sign.regexp</string> + </dict> + <dict> + <key>match</key> + <string>\(\?[iLmsux]+\)</string> + <key>name</key> + <string>keyword.other.option-toggle.regexp</string> + </dict> + <dict> + <key>match</key> + <string>(\()(\?P=([a-zA-Z_][a-zA-Z_0-9]*\w*))(\))</string> + <key>name</key> + <string>keyword.other.back-reference.named.regexp</string> + </dict> + <dict> + <key>begin</key> + <string>(\()((\?=)|(\?!)|(\?<=)|(\?<!))</string> + <key>beginCaptures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.group.regexp</string> + </dict> + <key>2</key> + <dict> + <key>name</key> + <string>punctuation.definition.group.assertion.regexp</string> + </dict> + <key>3</key> + <dict> + <key>name</key> + <string>meta.assertion.look-ahead.regexp</string> + </dict> + <key>4</key> + <dict> + <key>name</key> + <string>meta.assertion.negative-look-ahead.regexp</string> + </dict> + <key>5</key> + <dict> + <key>name</key> + <string>meta.assertion.look-behind.regexp</string> + </dict> + <key>6</key> + <dict> + <key>name</key> + <string>meta.assertion.negative-look-behind.regexp</string> + </dict> + </dict> + <key>end</key> + <string>(\))</string> + <key>endCaptures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.group.regexp</string> + </dict> + </dict> + <key>name</key> + <string>meta.group.assertion.regexp</string> + <key>patterns</key> + <array> + <dict> + <key>include</key> + <string>$self</string> + </dict> + </array> + </dict> + <dict> + <key>begin</key> + <string>(\()(\?\(([1-9][0-9]?|[a-zA-Z_][a-zA-Z_0-9]*)\))</string> + <key>beginCaptures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.group.regexp</string> + </dict> + <key>2</key> + <dict> + <key>name</key> + <string>punctuation.definition.group.assertion.conditional.regexp</string> + </dict> + <key>3</key> + <dict> + <key>name</key> + <string>entity.name.section.back-reference.regexp</string> + </dict> + </dict> + <key>comment</key> + <string>we can make this more sophisticated to match the | character that separates yes-pattern from no-pattern, but it's not really necessary.</string> + <key>end</key> + <string>(\))</string> + <key>name</key> + <string>meta.group.assertion.conditional.regexp</string> + <key>patterns</key> + <array> + <dict> + <key>include</key> + <string>$self</string> + </dict> + </array> + </dict> + <dict> + <key>begin</key> + <string>(\()((\?P<)([a-z]\w*)(>)|(\?:))?</string> + <key>beginCaptures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.group.regexp</string> + </dict> + <key>3</key> + <dict> + <key>name</key> + <string>punctuation.definition.group.capture.regexp</string> + </dict> + <key>4</key> + <dict> + <key>name</key> + <string>entity.name.section.group.regexp</string> + </dict> + <key>5</key> + <dict> + <key>name</key> + <string>punctuation.definition.group.capture.regexp</string> + </dict> + <key>6</key> + <dict> + <key>name</key> + <string>punctuation.definition.group.no-capture.regexp</string> + </dict> + </dict> + <key>end</key> + <string>(\))</string> + <key>endCaptures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.group.regexp</string> + </dict> + </dict> + <key>name</key> + <string>meta.group.regexp</string> + <key>patterns</key> + <array> + <dict> + <key>include</key> + <string>$self</string> + </dict> + </array> + </dict> + <dict> + <key>include</key> + <string>#character-class</string> + </dict> + </array> + <key>repository</key> + <dict> + <key>character-class</key> + <dict> + <key>patterns</key> + <array> + <dict> + <key>match</key> + <string>\\[wWsSdDhH]|\.</string> + <key>name</key> + <string>constant.character.character-class.regexp</string> + </dict> + <dict> + <key>match</key> + <string>\\.</string> + <key>name</key> + <string>constant.character.escape.backslash.regexp</string> + </dict> + <dict> + <key>begin</key> + <string>(\[)(\^)?</string> + <key>beginCaptures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.character-class.regexp</string> + </dict> + <key>2</key> + <dict> + <key>name</key> + <string>keyword.operator.negation.regexp</string> + </dict> + </dict> + <key>end</key> + <string>(\])</string> + <key>endCaptures</key> + <dict> + <key>1</key> + <dict> + <key>name</key> + <string>punctuation.definition.character-class.regexp</string> + </dict> + </dict> + <key>name</key> + <string>constant.other.character-class.set.regexp</string> + <key>patterns</key> + <array> + <dict> + <key>include</key> + <string>#character-class</string> + </dict> + <dict> + <key>captures</key> + <dict> + <key>2</key> + <dict> + <key>name</key> + <string>constant.character.escape.backslash.regexp</string> + </dict> + <key>4</key> + <dict> + <key>name</key> + <string>constant.character.escape.backslash.regexp</string> + </dict> + </dict> + <key>match</key> + <string>((\\.)|.)\-((\\.)|[^\]])</string> + <key>name</key> + <string>constant.other.character-class.range.regexp</string> + </dict> + </array> + </dict> + </array> + </dict> + </dict> + <key>scopeName</key> + <string>source.regexp.python</string> + <key>uuid</key> + <string>DD867ABF-1EC6-415D-B047-687F550A1D51</string> +</dict> +</plist> diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index acc71de6adf..d6b0a970407 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -416,9 +416,9 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz" }, "vscode-textmate": { - "version": "1.0.5", - "from": "vscode-textmate@1.0.5", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-1.0.5.tgz", + "version": "1.0.6", + "from": "vscode-textmate@1.0.6", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-1.0.6.tgz", "dependencies": { "oniguruma": { "version": "5.1.1", diff --git a/package.json b/package.json index 7b7cda595e2..26718fb8eae 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "iconv-lite": "^0.4.13", "sax": "^1.1.1", "semver": "^4.2.0", - "vscode-textmate": "^1.0.5", + "vscode-textmate": "^1.0.6", "winreg": "0.0.12", "yauzl": "^2.3.1" }, |