Added vscodium

This commit is contained in:
Kristofers Solo
2022-04-28 21:17:01 +03:00
parent 837a479d82
commit d7dddc39ef
29139 changed files with 250215 additions and 45125 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,435 @@
# AUTOGENERATED FROM grammars/src/MagicRegExp.syntax.yaml
name: "MagicRegExp"
scopeName: "source.regexp.python"
fileTypes: [
"re"
]
uuid: "39e15186-71e6-11e5-b82c-7c6d62900c7c"
patterns: [
{
include: "#regexp-expression"
}
]
repository:
"regexp-base-expression":
patterns: [
{
include: "#regexp-quantifier"
}
{
include: "#regexp-base-common"
}
]
"fregexp-base-expression":
patterns: [
{
include: "#fregexp-quantifier"
}
{
include: "#fstring-formatting-braces"
}
{
match: "\\{.*?\\}"
}
{
include: "#regexp-base-common"
}
]
"fstring-formatting-braces":
patterns: [
{
comment: "empty braces are illegal"
match: "({)(\\s*?)(})"
captures:
"1":
name: "constant.character.format.placeholder.other.python"
"2":
name: "invalid.illegal.brace.python"
"3":
name: "constant.character.format.placeholder.other.python"
}
{
name: "constant.character.escape.python"
match: "({{|}})"
}
]
"regexp-base-common":
patterns: [
{
name: "support.other.match.any.regexp"
match: "\\."
}
{
name: "support.other.match.begin.regexp"
match: "\\^"
}
{
name: "support.other.match.end.regexp"
match: "\\$"
}
{
name: "keyword.operator.quantifier.regexp"
match: "[+*?]\\??"
}
{
name: "keyword.operator.disjunction.regexp"
match: "\\|"
}
{
include: "#regexp-escape-sequence"
}
]
"regexp-quantifier":
name: "keyword.operator.quantifier.regexp"
match: '''
(?x)
\\{(
\\d+ | \\d+,(\\d+)? | ,\\d+
)\\}
'''
"fregexp-quantifier":
name: "keyword.operator.quantifier.regexp"
match: '''
(?x)
\\{\\{(
\\d+ | \\d+,(\\d+)? | ,\\d+
)\\}\\}
'''
"regexp-backreference-number":
name: "meta.backreference.regexp"
match: "(\\\\[1-9]\\d?)"
captures:
"1":
name: "entity.name.tag.backreference.regexp"
"regexp-backreference":
name: "meta.backreference.named.regexp"
match: '''
(?x)
(\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))
'''
captures:
"1":
name: "punctuation.parenthesis.backreference.named.begin.regexp support.other.parenthesis.regexp"
"2":
name: "entity.name.tag.named.backreference.regexp"
"3":
name: "punctuation.parenthesis.backreference.named.end.regexp support.other.parenthesis.regexp"
"regexp-flags":
name: "storage.modifier.flag.regexp"
match: "\\(\\?[aiLmsux]+\\)"
"regexp-escape-special":
name: "support.other.escape.special.regexp"
match: "\\\\([AbBdDsSwWZ])"
"regexp-escape-character":
name: "constant.character.escape.regexp"
match: '''
(?x)
\\\\ (
x[0-9A-Fa-f]{2}
| 0[0-7]{1,2}
| [0-7]{3}
)
'''
"regexp-escape-unicode":
name: "constant.character.unicode.regexp"
match: '''
(?x)
\\\\ (
u[0-9A-Fa-f]{4}
| U[0-9A-Fa-f]{8}
)
'''
"regexp-escape-catchall":
name: "constant.character.escape.regexp"
match: "\\\\(.|\\n)"
"regexp-escape-sequence":
patterns: [
{
include: "#regexp-escape-special"
}
{
include: "#regexp-escape-character"
}
{
include: "#regexp-escape-unicode"
}
{
include: "#regexp-backreference-number"
}
{
include: "#regexp-escape-catchall"
}
]
"regexp-charecter-set-escapes":
patterns: [
{
name: "constant.character.escape.regexp"
match: "\\\\[abfnrtv\\\\]"
}
{
include: "#regexp-escape-special"
}
{
name: "constant.character.escape.regexp"
match: "\\\\([0-7]{1,3})"
}
{
include: "#regexp-escape-character"
}
{
include: "#regexp-escape-unicode"
}
{
include: "#regexp-escape-catchall"
}
]
codetags:
match: "(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)"
captures:
"1":
name: "keyword.codetag.notation.python"
"regexp-expression":
patterns: [
{
include: "#regexp-base-expression"
}
{
include: "#regexp-character-set"
}
{
include: "#regexp-comments"
}
{
include: "#regexp-flags"
}
{
include: "#regexp-named-group"
}
{
include: "#regexp-backreference"
}
{
include: "#regexp-lookahead"
}
{
include: "#regexp-lookahead-negative"
}
{
include: "#regexp-lookbehind"
}
{
include: "#regexp-lookbehind-negative"
}
{
include: "#regexp-conditional"
}
{
include: "#regexp-parentheses-non-capturing"
}
{
include: "#regexp-parentheses"
}
]
"regexp-character-set":
patterns: [
{
match: '''
(?x)
\\[ \\^? \\] (?! .*?\\])
'''
}
{
name: "meta.character.set.regexp"
begin: "(\\[)(\\^)?(\\])?"
end: "(\\])"
beginCaptures:
"1":
name: "constant.other.set.regexp punctuation.character.set.begin.regexp"
"2":
name: "keyword.operator.negation.regexp"
"3":
name: "constant.character.set.regexp"
endCaptures:
"1":
name: "constant.other.set.regexp punctuation.character.set.end.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-charecter-set-escapes"
}
{
name: "constant.character.set.regexp"
match: "[^\\n]"
}
]
}
]
"regexp-named-group":
name: "meta.named.regexp"
begin: '''
(?x)
(\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)
'''
end: "(\\))"
beginCaptures:
"1":
name: "punctuation.parenthesis.named.begin.regexp support.other.parenthesis.regexp"
"2":
name: "entity.name.tag.named.group.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.named.end.regexp support.other.parenthesis.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]
"regexp-comments":
name: "comment.regexp"
begin: "\\(\\?#"
end: "(\\))"
beginCaptures:
"0":
name: "punctuation.comment.begin.regexp"
endCaptures:
"1":
name: "punctuation.comment.end.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#codetags"
}
]
"regexp-lookahead":
begin: "(\\()\\?="
end: "(\\))"
beginCaptures:
"0":
name: "keyword.operator.lookahead.regexp"
"1":
name: "punctuation.parenthesis.lookahead.begin.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]
"regexp-lookahead-negative":
begin: "(\\()\\?!"
end: "(\\))"
beginCaptures:
"0":
name: "keyword.operator.lookahead.negative.regexp"
"1":
name: "punctuation.parenthesis.lookahead.begin.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.negative.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]
"regexp-lookbehind":
begin: "(\\()\\?<="
end: "(\\))"
beginCaptures:
"0":
name: "keyword.operator.lookbehind.regexp"
"1":
name: "punctuation.parenthesis.lookbehind.begin.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]
"regexp-lookbehind-negative":
begin: "(\\()\\?<!"
end: "(\\))"
beginCaptures:
"0":
name: "keyword.operator.lookbehind.negative.regexp"
"1":
name: "punctuation.parenthesis.lookbehind.begin.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.negative.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]
"regexp-conditional":
begin: "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)"
end: "(\\))"
beginCaptures:
"0":
name: "keyword.operator.conditional.regexp"
"1":
name: "punctuation.parenthesis.conditional.begin.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.conditional.end.regexp keyword.operator.conditional.negative.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]
"regexp-parentheses-non-capturing":
begin: "\\(\\?:"
end: "(\\))"
beginCaptures:
"0":
name: "punctuation.parenthesis.non-capturing.begin.regexp support.other.parenthesis.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.non-capturing.end.regexp support.other.parenthesis.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]
"regexp-parentheses":
begin: "\\("
end: "(\\))"
beginCaptures:
"0":
name: "punctuation.parenthesis.begin.regexp support.other.parenthesis.regexp"
endCaptures:
"1":
name: "punctuation.parenthesis.end.regexp support.other.parenthesis.regexp"
"2":
name: "invalid.illegal.newline.python"
patterns: [
{
include: "#regexp-expression"
}
]

View File

@@ -0,0 +1,795 @@
<!-- AUTOGENERATED FROM grammars/src/MagicRegExp.syntax.yaml -->
<?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>name</key>
<string>MagicRegExp</string>
<key>scopeName</key>
<string>source.regexp.python</string>
<key>fileTypes</key>
<array>
<string>re</string>
</array>
<key>uuid</key>
<string>39e15186-71e6-11e5-b82c-7c6d62900c7c</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>regexp-base-expression</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-quantifier</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-base-common</string>
</dict>
</array>
</dict>
<key>fregexp-base-expression</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#fregexp-quantifier</string>
</dict>
<dict>
<key>include</key>
<string>#fstring-formatting-braces</string>
</dict>
<dict>
<key>match</key>
<string>\{.*?\}</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-base-common</string>
</dict>
</array>
</dict>
<key>fstring-formatting-braces</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>comment</key>
<string>empty braces are illegal</string>
<key>match</key>
<string>({)(\s*?)(})</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>constant.character.format.placeholder.other.python</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.brace.python</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>constant.character.format.placeholder.other.python</string>
</dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>constant.character.escape.python</string>
<key>match</key>
<string>({{|}})</string>
</dict>
</array>
</dict>
<key>regexp-base-common</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>support.other.match.any.regexp</string>
<key>match</key>
<string>\.</string>
</dict>
<dict>
<key>name</key>
<string>support.other.match.begin.regexp</string>
<key>match</key>
<string>\^</string>
</dict>
<dict>
<key>name</key>
<string>support.other.match.end.regexp</string>
<key>match</key>
<string>\$</string>
</dict>
<dict>
<key>name</key>
<string>keyword.operator.quantifier.regexp</string>
<key>match</key>
<string>[+*?]\??</string>
</dict>
<dict>
<key>name</key>
<string>keyword.operator.disjunction.regexp</string>
<key>match</key>
<string>\|</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-sequence</string>
</dict>
</array>
</dict>
<key>regexp-quantifier</key>
<dict>
<key>name</key>
<string>keyword.operator.quantifier.regexp</string>
<key>match</key>
<string>(?x)
\{(
\d+ | \d+,(\d+)? | ,\d+
)\}
</string>
</dict>
<key>fregexp-quantifier</key>
<dict>
<key>name</key>
<string>keyword.operator.quantifier.regexp</string>
<key>match</key>
<string>(?x)
\{\{(
\d+ | \d+,(\d+)? | ,\d+
)\}\}
</string>
</dict>
<key>regexp-backreference-number</key>
<dict>
<key>name</key>
<string>meta.backreference.regexp</string>
<key>match</key>
<string>(\\[1-9]\d?)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.name.tag.backreference.regexp</string>
</dict>
</dict>
</dict>
<key>regexp-backreference</key>
<dict>
<key>name</key>
<string>meta.backreference.named.regexp</string>
<key>match</key>
<string>(?x)
(\() (\?P= \w+(?:\s+[[:alnum:]]+)?) (\))
</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.begin.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.tag.named.backreference.regexp</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.end.regexp</string>
</dict>
</dict>
</dict>
<key>regexp-flags</key>
<dict>
<key>name</key>
<string>storage.modifier.flag.regexp</string>
<key>match</key>
<string>\(\?[aiLmsux]+\)</string>
</dict>
<key>regexp-escape-special</key>
<dict>
<key>name</key>
<string>support.other.escape.special.regexp</string>
<key>match</key>
<string>\\([AbBdDsSwWZ])</string>
</dict>
<key>regexp-escape-character</key>
<dict>
<key>name</key>
<string>constant.character.escape.regexp</string>
<key>match</key>
<string>(?x)
\\ (
x[0-9A-Fa-f]{2}
| 0[0-7]{1,2}
| [0-7]{3}
)
</string>
</dict>
<key>regexp-escape-unicode</key>
<dict>
<key>name</key>
<string>constant.character.unicode.regexp</string>
<key>match</key>
<string>(?x)
\\ (
u[0-9A-Fa-f]{4}
| U[0-9A-Fa-f]{8}
)
</string>
</dict>
<key>regexp-escape-catchall</key>
<dict>
<key>name</key>
<string>constant.character.escape.regexp</string>
<key>match</key>
<string>\\(.|\n)</string>
</dict>
<key>regexp-escape-sequence</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-escape-special</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-character</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-unicode</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-backreference-number</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-catchall</string>
</dict>
</array>
</dict>
<key>regexp-charecter-set-escapes</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>constant.character.escape.regexp</string>
<key>match</key>
<string>\\[abfnrtv\\]</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-special</string>
</dict>
<dict>
<key>name</key>
<string>constant.character.escape.regexp</string>
<key>match</key>
<string>\\([0-7]{1,3})</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-character</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-unicode</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-escape-catchall</string>
</dict>
</array>
</dict>
<key>codetags</key>
<dict>
<key>match</key>
<string>(?:\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\b)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.codetag.notation.python</string>
</dict>
</dict>
</dict>
<key>regexp-expression</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-base-expression</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-character-set</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-comments</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-flags</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-named-group</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-backreference</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-lookahead</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-lookahead-negative</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-lookbehind</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-lookbehind-negative</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-conditional</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-parentheses-non-capturing</string>
</dict>
<dict>
<key>include</key>
<string>#regexp-parentheses</string>
</dict>
</array>
</dict>
<key>regexp-character-set</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(?x)
\[ \^? \] (?! .*?\])
</string>
</dict>
<dict>
<key>name</key>
<string>meta.character.set.regexp</string>
<key>begin</key>
<string>(\[)(\^)?(\])?</string>
<key>end</key>
<string>(\])</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.character.set.begin.regexp constant.other.set.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.operator.negation.regexp</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>constant.character.set.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.character.set.end.regexp constant.other.set.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-charecter-set-escapes</string>
</dict>
<dict>
<key>name</key>
<string>constant.character.set.regexp</string>
<key>match</key>
<string>[^\n]</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>regexp-named-group</key>
<dict>
<key>name</key>
<string>meta.named.regexp</string>
<key>begin</key>
<string>(?x)
(\() (\?P &lt;\w+(?:\s+[[:alnum:]]+)?&gt;)
</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.tag.named.group.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
<key>regexp-comments</key>
<dict>
<key>name</key>
<string>comment.regexp</string>
<key>begin</key>
<string>\(\?#</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.comment.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.comment.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#codetags</string>
</dict>
</array>
</dict>
<key>regexp-lookahead</key>
<dict>
<key>begin</key>
<string>(\()\?=</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.operator.lookahead.regexp</string>
</dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.parenthesis.lookahead.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
<key>regexp-lookahead-negative</key>
<dict>
<key>begin</key>
<string>(\()\?!</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.operator.lookahead.negative.regexp</string>
</dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.parenthesis.lookahead.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
<key>regexp-lookbehind</key>
<dict>
<key>begin</key>
<string>(\()\?&lt;=</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.operator.lookbehind.regexp</string>
</dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.parenthesis.lookbehind.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
<key>regexp-lookbehind-negative</key>
<dict>
<key>begin</key>
<string>(\()\?&lt;!</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.operator.lookbehind.negative.regexp</string>
</dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.parenthesis.lookbehind.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
<key>regexp-conditional</key>
<dict>
<key>begin</key>
<string>(\()\?\((\w+(?:\s+[[:alnum:]]+)?|\d+)\)</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.operator.conditional.regexp</string>
</dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.parenthesis.conditional.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
<key>regexp-parentheses-non-capturing</key>
<dict>
<key>begin</key>
<string>\(\?:</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
<key>regexp-parentheses</key>
<dict>
<key>begin</key>
<string>\(</string>
<key>end</key>
<string>(\))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp</string>
</dict>
</dict>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.other.parenthesis.regexp punctuation.parenthesis.end.regexp</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>invalid.illegal.newline.python</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regexp-expression</string>
</dict>
</array>
</dict>
</dict>
</dict>
</plist>

View File

@@ -0,0 +1,50 @@
# Copyright (c) 2014 GitHub Inc.
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# --------------------------------------------------------------------
# This package was derived from a TextMate bundle located at
# https://github.com/textmate/python.tmbundle and distributed under the following
# license, located in `README.mdown`:
# Permission to copy, use, modify, sell and distribute this
# software is granted. This software is provided "as is" without
# express or implied warranty, and with no claim as to its
# suitability for any purpose.
'scopeName': 'text.python.console'
'name': 'Python Console'
'fileTypes': [
'doctest'
'pycon'
]
'patterns': [
{
'match': '^(>{3}|\\.{3}|In \\[\\d+\\]:) (.+)$'
'captures':
'1':
'name': 'punctuation.separator.prompt.python.console'
'2':
'patterns': [
'include': 'source.python'
]
}
]

View File

@@ -0,0 +1,66 @@
# Copyright (c) 2014 GitHub Inc.
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# --------------------------------------------------------------------
# This package was derived from a TextMate bundle located at
# https://github.com/textmate/python.tmbundle and distributed under the following
# license, located in `README.mdown`:
# Permission to copy, use, modify, sell and distribute this
# software is granted. This software is provided "as is" without
# express or implied warranty, and with no claim as to its
# suitability for any purpose.
'scopeName': 'text.python.traceback'
'name': 'Python Traceback'
'fileTypes': [
'pytb'
]
'patterns': [
{
'match': '^ File ("[^"]+"), line (\\d+)(?:, in (.+))?$'
'captures': {
'1':
'name': 'string.python.traceback'
'2':
'name': 'constant.numeric.python.traceback'
'3':
'name': 'entity.name.function.python.traceback'
}
}
{
'match': '^ (.+)$'
'captures':
'1':
'patterns': [
'include': 'source.python'
]
}
{
'match': '^([^\\s:]+):(?: (.+))?$'
'captures':
'1':
'name': 'entity.name.type.class.python.traceback'
'2':
'name': 'string.python.traceback'
}
]

View File

@@ -0,0 +1,20 @@
---
name: MagicRegExp
scopeName: source.regexp.python
fileTypes: [re]
uuid: 39e15186-71e6-11e5-b82c-7c6d62900c7c
patterns:
- include: '#regexp-expression'
repository:
$apply:
- file: 'regexp-common.inc.syntax.yaml'
- file: 'regexp.inc.syntax.yaml'
vars:
prefix: ''
basename: regexp
marker: ''
nested: ''
guard: ''
...

View File

@@ -0,0 +1,11 @@
---
repository:
comments${suffix}:
name: comment.line.number-sign.python
begin: (\#)
beginCaptures:
'1': {name: punctuation.definition.comment.python}
end: ($${marker})
patterns:
- include: '#codetags'
...

View File

@@ -0,0 +1,177 @@
---
repository:
fstring-fnorm-quoted-${line}-line:
name: meta.fstring.python
begin: (\b[fF])([bBuU])?(${marker})
end: (\3)${guard}
beginCaptures:
# "storage.type.string.python" class should be the first one,
# because Atom, VSCode and GitHub don't understand scopes
# separated by whitespace, and simply use the first one
# of them. Highlighting 'f' as 'storage.type' is more
# important for us than having other scopes.
'1': {name: storage.type.string.python
string.quoted.${line}.python
string.interpolated.python}
'2': {name: invalid.illegal.prefix.python}
'3': {name: string.quoted.${line}.python
string.interpolated.python
punctuation.definition.string.begin.python}
endCaptures:
'1': {name: string.quoted.${line}.python
string.interpolated.python
punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#fstring-guts'
- include: '#fstring-illegal-${line}-brace'
- include: '#fstring-${line}-brace'
- include: '#fstring-${line}-core'
fstring-normf-quoted-${line}-line:
name: meta.fstring.python
begin: (\b[bBuU])([fF])(${marker})
end: (\3)${guard}
beginCaptures:
'1': {name: invalid.illegal.prefix.python}
'2': {name: storage.type.string.python
string.quoted.${line}.python
string.interpolated.python}
'3': {name: string.quoted.${line}.python
punctuation.definition.string.begin.python}
endCaptures:
'1': {name: string.quoted.${line}.python
string.interpolated.python
punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#fstring-guts'
- include: '#fstring-illegal-${line}-brace'
- include: '#fstring-${line}-brace'
- include: '#fstring-${line}-core'
fstring-raw-quoted-${line}-line:
name: meta.fstring.python
begin: (\b(?:[R][fF]|[fF][R]))(${marker})
end: (\2)${guard}
beginCaptures:
'1': {name: storage.type.string.python
string.quoted.raw.${line}.python
string.interpolated.python}
'2': {name: string.quoted.raw.${line}.python
punctuation.definition.string.begin.python}
endCaptures:
'1': {name: string.quoted.raw.${line}.python
string.interpolated.python
punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#fstring-raw-guts'
- include: '#fstring-illegal-${line}-brace'
- include: '#fstring-${line}-brace'
- include: '#fstring-raw-${line}-core'
fstring-${line}-core:
name: string.quoted.${line}.python string.interpolated.python
match: |
(?x)
(.+?)
(
(?# .* and .*? in multi-line match need special handling of
newlines otherwise SublimeText and Atom will match slightly
differently.
The guard for newlines has to be separate from the
lookahead because of special $ matching rule.)
($\n?)
|
(?=[\\\}\{]|${marker}${guard})
)
(?# due to how multiline regexps are matched we need a special case
for matching a newline character)
| \n
fstring-raw-${line}-core:
name: string.quoted.raw.${line}.python string.interpolated.python
match: |
(?x)
(.+?)
(
(?# .* and .*? in multi-line match need special handling of
newlines otherwise SublimeText and Atom will match slightly
differently.
The guard for newlines has to be separate from the
lookahead because of special $ matching rule.)
($\n?)
|
(?=[\\\}\{]|${marker}${guard})
)
(?# due to how multiline regexps are matched we need a special case
for matching a newline character)
| \n
fstring-${line}-brace:
comment: value interpolation using { ... }
begin: (\{)
end: |
(?x)
(\})${fguard}
beginCaptures:
'1': {name: constant.character.format.placeholder.other.python}
endCaptures:
'1': {name: constant.character.format.placeholder.other.python}
patterns:
- include: '#fstring-terminator-${line}'
- include: '#f-expression'
fstring-terminator-${line}:
patterns:
- name: storage.type.format.python
match: (![rsa])(?=})
- match: |
(?x)
(![rsa])?
( : \w? [<>=^]? [-+ ]? \#?
\d* ,? (\.\d+)? [bcdeEfFgGnosxX%]? )(?=})
captures:
# We use this awkward scope name instead of perhaps more
# elegant "support.other.format.python" because it appears
# that by default it gives a better visual result in various
# systems (e.g. GitHub). This is due to the fact that
# "storage.type..." is more likely to have special
# highlighting in any given color scheme than
# "support.other..."
#
'1': {name: storage.type.format.python}
'2': {name: storage.type.format.python}
- include: '#fstring-terminator-${line}-tail'
fstring-terminator-${line}-tail:
begin: (![rsa])?(:)(?=.*?{)
end: (?=})${fguard}
beginCaptures:
'1': {name: storage.type.format.python}
'2': {name: storage.type.format.python}
patterns:
- include: '#fstring-illegal-${line}-brace'
- include: '#fstring-${line}-brace'
- name: storage.type.format.python
match: ([bcdeEfFgGnosxX%])(?=})
- name: storage.type.format.python
match: (\.\d+)
- name: storage.type.format.python
match: (,)
- name: storage.type.format.python
match: (\d+)
- name: storage.type.format.python
match: (\#)
- name: storage.type.format.python
match: ([-+ ])
- name: storage.type.format.python
match: ([<>=^])
- name: storage.type.format.python
match: (\w)
...

View File

@@ -0,0 +1,118 @@
---
repository:
string-raw-quoted-${line}-line:
name: string.quoted.raw.${line}.python
begin: \b(([uU]R)|(R))(${marker})
end: (\4)${guard}
beginCaptures:
'2': {name: invalid.deprecated.prefix.python}
'3': {name: storage.type.string.python}
'4': {name: punctuation.definition.string.begin.python}
endCaptures:
'1': {name: punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#string-${line}-bad-brace1-formatting-raw'
- include: '#string-${line}-bad-brace2-formatting-raw'
- include: '#string-raw-guts'
string-bin-quoted-${line}-line:
name: string.quoted.binary.${line}.python
begin: (\b[bB])(${marker})
end: (\2)${guard}
beginCaptures:
'1': {name: storage.type.string.python}
'2': {name: punctuation.definition.string.begin.python}
endCaptures:
'1': {name: punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#string-entity'
string-raw-bin-quoted-${line}-line:
name: string.quoted.raw.binary.${line}.python
begin: (\b(?:R[bB]|[bB]R))(${marker})
end: (\2)${guard}
beginCaptures:
'1': {name: storage.type.string.python}
'2': {name: punctuation.definition.string.begin.python}
endCaptures:
'1': {name: punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#string-raw-bin-guts'
string-quoted-${line}-line:
name: string.quoted.${line}.python
begin: (?:\b([rR])(?=[uU]))?([uU])?(${marker})
end: (\3)${guard}
beginCaptures:
'1': {name: invalid.illegal.prefix.python}
'2': {name: storage.type.string.python}
'3': {name: punctuation.definition.string.begin.python}
endCaptures:
'1': {name: punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#string-${line}-bad-brace1-formatting-unicode'
- include: '#string-${line}-bad-brace2-formatting-unicode'
- include: '#string-unicode-guts'
string-${line}-bad-brace1-formatting-unicode:
comment: template using {% ... %}
begin: |
(?x)
(?= \{%
( .*? (?!${marker}${guard}) )
%\}
)
end: (?=${marker}${guard})
patterns:
- include: '#escape-sequence-unicode'
- include: '#escape-sequence'
- include: '#string-line-continuation'
string-${line}-bad-brace1-formatting-raw:
comment: template using {% ... %}
begin: |
(?x)
(?= \{%
( .*? (?!${marker}${guard}) )
%\}
)
end: (?=${marker}${guard})
patterns:
- include: '#string-consume-escape'
string-${line}-bad-brace2-formatting-unicode:
comment: odd format or format-like syntax
begin: |
(?x)
(?!\{\{)
(?= \{ (
\w*? (?!${marker}${guard}) [^!:\.\[}\w]
)
.*?(?!${marker}${guard})
\}
)
end: (?=${marker}${guard})
patterns:
- include: '#escape-sequence-unicode'
- include: '#string-entity'
string-${line}-bad-brace2-formatting-raw:
comment: odd format or format-like syntax
begin: |
(?x)
(?!\{\{)
(?= \{ (
\w*? (?!${marker}${guard}) [^!:\.\[}\w]
)
.*?(?!${marker}${guard})
\}
)
end: (?=${marker}${guard})
patterns:
- include: '#string-consume-escape'
- include: '#string-formatting'
...

View File

@@ -0,0 +1,128 @@
---
repository:
regexp-base-expression:
patterns:
- include: '#regexp-quantifier'
- include: '#regexp-base-common'
fregexp-base-expression:
patterns:
- include: '#fregexp-quantifier'
- include: '#fstring-formatting-braces'
- match: \{.*?\}
- include: '#regexp-base-common'
fstring-formatting-braces:
patterns:
- comment: empty braces are illegal
match: ({)(\s*?)(})
captures:
'1': {name: constant.character.format.placeholder.other.python}
'2': {name: invalid.illegal.brace.python}
'3': {name: constant.character.format.placeholder.other.python}
- name: constant.character.escape.python
match: ({{|}})
regexp-base-common:
patterns:
- name: support.other.match.any.regexp
match: \.
- name: support.other.match.begin.regexp
match: \^
- name: support.other.match.end.regexp
match: \$
- name: keyword.operator.quantifier.regexp
match: '[+*?]\??'
- name: keyword.operator.disjunction.regexp
match: \|
- include: '#regexp-escape-sequence'
regexp-quantifier:
name: keyword.operator.quantifier.regexp
match: |
(?x)
\{(
\d+ | \d+,(\d+)? | ,\d+
)\}
fregexp-quantifier:
name: keyword.operator.quantifier.regexp
match: |
(?x)
\{\{(
\d+ | \d+,(\d+)? | ,\d+
)\}\}
regexp-backreference-number:
name: meta.backreference.regexp
match: (\\[1-9]\d?)
captures:
'1': {name: entity.name.tag.backreference.regexp}
regexp-backreference:
name: meta.backreference.named.regexp
match: |
(?x)
(\() (\?P= \w+(?:\s+[[:alnum:]]+)?) (\))
captures:
'1': {name: punctuation.parenthesis.backreference.named.begin.regexp
support.other.parenthesis.regexp}
'2': {name: entity.name.tag.named.backreference.regexp}
'3': {name: punctuation.parenthesis.backreference.named.end.regexp
support.other.parenthesis.regexp}
regexp-flags:
name: storage.modifier.flag.regexp
match: \(\?[aiLmsux]+\)
regexp-escape-special:
name: support.other.escape.special.regexp
match: \\([AbBdDsSwWZ])
regexp-escape-character:
name: constant.character.escape.regexp
match: |
(?x)
\\ (
x[0-9A-Fa-f]{2}
| 0[0-7]{1,2}
| [0-7]{3}
)
regexp-escape-unicode:
name: constant.character.unicode.regexp
match: |
(?x)
\\ (
u[0-9A-Fa-f]{4}
| U[0-9A-Fa-f]{8}
)
regexp-escape-catchall:
name: constant.character.escape.regexp
match: \\(.|\n)
regexp-escape-sequence:
patterns:
- include: '#regexp-escape-special'
- include: '#regexp-escape-character'
- include: '#regexp-escape-unicode'
- include: '#regexp-backreference-number'
- include: '#regexp-escape-catchall'
regexp-charecter-set-escapes:
patterns:
- name: constant.character.escape.regexp
match: \\[abfnrtv\\]
- include: '#regexp-escape-special'
- name: constant.character.escape.regexp
match: \\([0-7]{1,3})
- include: '#regexp-escape-character'
- include: '#regexp-escape-unicode'
- include: '#regexp-escape-catchall'
codetags:
match: (?:\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\b)
captures:
'1': {name: keyword.codetag.notation.python}
...

View File

@@ -0,0 +1,170 @@
---
repository:
${prefix}${basename}-expression:
patterns:
- include: '#${basename}-base-expression'
- include: '#${prefix}regexp-character-set'
- include: '#${prefix}regexp-comments'
- include: '#regexp-flags'
- include: '#${prefix}regexp-named-group'
- include: '#regexp-backreference'
- include: '#${prefix}${basename}-lookahead'
- include: '#${prefix}${basename}-lookahead-negative'
- include: '#${prefix}${basename}-lookbehind'
- include: '#${prefix}${basename}-lookbehind-negative'
- include: '#${prefix}${basename}-conditional'
- include: '#${prefix}${basename}-parentheses-non-capturing'
- include: '#${prefix}${basename}-parentheses'
${nested}
${prefix}regexp-character-set:
patterns:
- match: |
(?x)
\[ \^? \] (?! .*?\])
- name: meta.character.set.regexp
begin: (\[)(\^)?(\])?
end: (\]${marker})${guard}
beginCaptures:
'1': {name: constant.other.set.regexp
punctuation.character.set.begin.regexp}
'2': {name: keyword.operator.negation.regexp}
'3': {name: constant.character.set.regexp}
endCaptures:
'1': {name: constant.other.set.regexp
punctuation.character.set.end.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#regexp-charecter-set-escapes'
- name: constant.character.set.regexp
match: '[^\n]'
${prefix}${basename}-named-group:
name: meta.named.regexp
begin: |
(?x)
(\() (\?P <\w+(?:\s+[[:alnum:]]+)?>)
end: (\)${marker})${guard}
beginCaptures:
'1': {name: punctuation.parenthesis.named.begin.regexp
support.other.parenthesis.regexp}
'2': {name: entity.name.tag.named.group.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.named.end.regexp
support.other.parenthesis.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
${prefix}regexp-comments:
name: comment.regexp
begin: \(\?#
end: (\)${marker})${guard}
beginCaptures:
'0': {name: punctuation.comment.begin.regexp}
endCaptures:
'1': {name: punctuation.comment.end.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#codetags'
${prefix}${basename}-lookahead:
begin: '(\()\?='
end: (\)${marker})${guard}
beginCaptures:
'0': {name: keyword.operator.lookahead.regexp}
'1': {name: punctuation.parenthesis.lookahead.begin.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.lookahead.end.regexp
keyword.operator.lookahead.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
${prefix}${basename}-lookahead-negative:
begin: '(\()\?!'
end: (\)${marker})${guard}
beginCaptures:
'0': {name: keyword.operator.lookahead.negative.regexp}
'1': {name: punctuation.parenthesis.lookahead.begin.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.lookahead.end.regexp
keyword.operator.lookahead.negative.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
${prefix}${basename}-lookbehind:
begin: '(\()\?<='
end: (\)${marker})${guard}
beginCaptures:
'0': {name: keyword.operator.lookbehind.regexp}
'1': {name: punctuation.parenthesis.lookbehind.begin.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.lookbehind.end.regexp
keyword.operator.lookbehind.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
${prefix}${basename}-lookbehind-negative:
begin: '(\()\?<!'
end: (\)${marker})${guard}
beginCaptures:
'0': {name: keyword.operator.lookbehind.negative.regexp}
'1': {name: punctuation.parenthesis.lookbehind.begin.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.lookbehind.end.regexp
keyword.operator.lookbehind.negative.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
${prefix}${basename}-conditional:
begin: '(\()\?\((\w+(?:\s+[[:alnum:]]+)?|\d+)\)'
end: (\)${marker})${guard}
beginCaptures:
'0': {name: keyword.operator.conditional.regexp}
'1': {name: punctuation.parenthesis.conditional.begin.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.conditional.end.regexp
keyword.operator.conditional.negative.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
${prefix}${basename}-parentheses-non-capturing:
begin: '\(\?:'
end: (\)${marker})${guard}
beginCaptures:
'0': {name: punctuation.parenthesis.non-capturing.begin.regexp
support.other.parenthesis.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.non-capturing.end.regexp
support.other.parenthesis.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
${prefix}${basename}-parentheses:
begin: \(
end: (\)${marker})${guard}
beginCaptures:
'0': {name: punctuation.parenthesis.begin.regexp
support.other.parenthesis.regexp}
endCaptures:
'1': {name: punctuation.parenthesis.end.regexp
support.other.parenthesis.regexp}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
${nested}
...

View File

@@ -0,0 +1,17 @@
---
repository:
${basename}-${prefix}line:
name: ${scopename}
begin: \b(([uU]r)|(${modifier}r)|(r${modifier}?))${bquote}
end: ${equote}
beginCaptures:
'2': {name: invalid.deprecated.prefix.python}
'3': {name: storage.type.string.python}
'4': {name: storage.type.string.python}
'5': {name: punctuation.definition.string.begin.python}
endCaptures:
'1': {name: punctuation.definition.string.end.python}
'2': {name: invalid.illegal.newline.python}
patterns:
- include: '#${prefix}${basename}-expression'
...