mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-03-18 08:09:40 +00:00
129 lines
3.4 KiB
YAML
129 lines
3.4 KiB
YAML
---
|
|
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}
|
|
...
|