123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- 'scopeName': 'source.js.regexp'
- 'patterns': [
- {
- 'include': '#regexp'
- }
- ]
- 'repository':
- 'regex-character-class':
- 'patterns': [
- {
- 'match': '\\\\[wWsSdDtrnvf]|\\.'
- 'name': 'constant.character.character-class.regexp'
- }
- {
- 'match': '\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})'
- 'name': 'constant.character.numeric.regexp'
- }
- {
- 'match': '\\\\c[A-Z]'
- 'name': 'constant.character.control.regexp'
- }
- {
- 'match': '\\\\.'
- 'name': 'constant.character.escape.backslash.regexp'
- }
- ]
- 'regexp':
- 'patterns': [
- {
- 'match': '\\\\[bB]|\\^|\\$'
- 'name': 'keyword.control.anchor.regexp'
- }
- {
- 'match': '\\\\[1-9]\\d*|\\\\k<[a-zA-Z_$][\\w$]*>'
- 'name': 'keyword.other.back-reference.regexp'
- }
- {
- 'match': '[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??'
- 'name': 'keyword.operator.quantifier.regexp'
- }
- {
- 'match': '\\|'
- 'name': 'keyword.operator.or.regexp'
- }
- {
- 'begin': '(\\()(?:(\\?=)|(\\?!)|(\\?<=)|(\\?<!))'
- 'beginCaptures':
- '1':
- 'name': 'punctuation.definition.group.regexp'
- '2':
- 'name': 'meta.assertion.look-ahead.regexp'
- '3':
- 'name': 'meta.assertion.negative-look-ahead.regexp'
- '4':
- 'name': 'meta.assertion.look-behind.regexp'
- '5':
- 'name': 'meta.assertion.negative-look-behind.regexp'
- 'end': '(\\))'
- 'endCaptures':
- '1':
- 'name': 'punctuation.definition.group.regexp'
- 'name': 'meta.group.assertion.regexp'
- 'patterns': [
- {
- 'include': '#regexp'
- }
- ]
- }
- {
- 'begin': '\\(((\\?:)|(\\?<[a-zA-Z_$][\\w$]*>))?'
- 'beginCaptures':
- '0':
- 'name': 'punctuation.definition.group.regexp'
- 'end': '\\)'
- 'endCaptures':
- '0':
- 'name': 'punctuation.definition.group.regexp'
- 'name': 'meta.group.regexp'
- 'patterns': [
- {
- 'include': '#regexp'
- }
- ]
- }
- {
- 'begin': '(\\[)(\\^)?'
- 'beginCaptures':
- '1':
- 'name': 'punctuation.definition.character-class.regexp'
- '2':
- 'name': 'keyword.operator.negation.regexp'
- 'end': '(\\])'
- 'endCaptures':
- '1':
- 'name': 'punctuation.definition.character-class.regexp'
- 'name': 'constant.other.character-class.set.regexp'
- 'patterns': [
- {
- 'captures':
- '1':
- 'name': 'constant.character.numeric.regexp'
- '2':
- 'name': 'constant.character.control.regexp'
- '3':
- 'name': 'constant.character.escape.backslash.regexp'
- '4':
- 'name': 'constant.character.numeric.regexp'
- '5':
- 'name': 'constant.character.control.regexp'
- '6':
- 'name': 'constant.character.escape.backslash.regexp'
- 'match': '(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))'
- 'name': 'constant.other.character-class.range.regexp'
- }
- {
- 'include': '#regex-character-class'
- }
- ]
- }
- {
- 'include': '#regex-character-class'
- }
- ]
|