@@ -35,31 +35,147 @@ repository:
3535 - file : ' regexp.inc.syntax.yaml'
3636 vars :
3737 prefix : ' single-one-'
38+ basename : ' regexp'
3839 marker : " |(?=\\ ')"
3940 nested : ' '
4041 guard : " |((?=(?<!\\\\ )\\ n))"
4142
4243 - file : ' regexp.inc.syntax.yaml'
4344 vars :
4445 prefix : ' single-three-'
46+ basename : ' regexp'
4547 marker : " |(?=\\ '\\ '\\ ')"
4648 nested : " - include: '#comments-string-single-three'"
4749 guard : " "
4850
4951 - file : ' regexp.inc.syntax.yaml'
5052 vars :
5153 prefix : ' double-one-'
54+ basename : ' regexp'
5255 marker : ' |(?=")'
5356 nested : ' '
5457 guard : " |((?=(?<!\\\\ )\\ n))"
5558
5659 - file : ' regexp.inc.syntax.yaml'
5760 vars :
5861 prefix : ' double-three-'
62+ basename : ' regexp'
5963 marker : ' |(?=""")'
6064 nested : " - include: '#comments-string-double-three'"
6165 guard : " "
6266
67+ - file : ' regexp.wrapper.syntax.yaml'
68+ vars :
69+ scopename : string.regexp.quoted.single.python
70+ prefix : ' single-one-'
71+ basename : ' regexp'
72+ nested : ' '
73+ modifier : ' [bB]'
74+ bquote : " (\\ ')"
75+ equote : " (\\ ')|(?<!\\\\ )(\\ n)"
76+
77+ - file : ' regexp.wrapper.syntax.yaml'
78+ vars :
79+ scopename : string.regexp.quoted.multi.python
80+ prefix : ' single-three-'
81+ basename : ' regexp'
82+ nested : " - include: '#comments-string-single-three'"
83+ modifier : ' [bB]'
84+ bquote : " (\\ '\\ '\\ ')"
85+ equote : " (\\ '\\ '\\ ')"
86+
87+ - file : ' regexp.wrapper.syntax.yaml'
88+ vars :
89+ scopename : string.regexp.quoted.single.python
90+ prefix : ' double-one-'
91+ basename : ' regexp'
92+ nested : ' '
93+ modifier : ' [bB]'
94+ bquote : ' (")'
95+ equote : ' (")|(?<!\\)(\n)'
96+
97+ - file : ' regexp.wrapper.syntax.yaml'
98+ vars :
99+ scopename : string.regexp.quoted.multi.python
100+ prefix : ' double-three-'
101+ basename : ' regexp'
102+ nested : " - include: '#comments-string-double-three'"
103+ modifier : ' [bB]'
104+ bquote : ' (""")'
105+ equote : ' (""")'
106+
107+ - file : ' regexp.inc.syntax.yaml'
108+ vars :
109+ prefix : ' single-one-'
110+ basename : ' fregexp'
111+ marker : " |(?=\\ ')"
112+ nested : ' '
113+ guard : " |((?=(?<!\\\\ )\\ n))"
114+
115+ - file : ' regexp.inc.syntax.yaml'
116+ vars :
117+ prefix : ' single-three-'
118+ basename : ' fregexp'
119+ marker : " |(?=\\ '\\ '\\ ')"
120+ nested : " - include: '#comments-string-single-three'"
121+ guard : " "
122+
123+ - file : ' regexp.inc.syntax.yaml'
124+ vars :
125+ prefix : ' double-one-'
126+ basename : ' fregexp'
127+ marker : ' |(?=")'
128+ nested : ' '
129+ guard : " |((?=(?<!\\\\ )\\ n))"
130+
131+ - file : ' regexp.inc.syntax.yaml'
132+ vars :
133+ prefix : ' double-three-'
134+ basename : ' fregexp'
135+ marker : ' |(?=""")'
136+ nested : " - include: '#comments-string-double-three'"
137+ guard : " "
138+
139+ - file : ' regexp.wrapper.syntax.yaml'
140+ vars :
141+ scopename : string.regexp.quoted.single.python
142+ prefix : ' single-one-'
143+ basename : ' fregexp'
144+ nested : ' '
145+ modifier : ' [fF]'
146+ bquote : " (\\ ')"
147+ equote : " (\\ ')|(?<!\\\\ )(\\ n)"
148+
149+ - file : ' regexp.wrapper.syntax.yaml'
150+ vars :
151+ scopename : string.regexp.quoted.multi.python
152+ prefix : ' single-three-'
153+ basename : ' fregexp'
154+ nested : " - include: '#comments-string-single-three'"
155+ modifier : ' [fF]'
156+ bquote : " (\\ '\\ '\\ ')"
157+ equote : " (\\ '\\ '\\ ')"
158+
159+ - file : ' regexp.wrapper.syntax.yaml'
160+ vars :
161+ scopename : string.regexp.quoted.single.python
162+ prefix : ' double-one-'
163+ basename : ' fregexp'
164+ nested : ' '
165+ modifier : ' [fF]'
166+ bquote : ' (")'
167+ equote : ' (")|(?<!\\)(\n)'
168+
169+ - file : ' regexp.wrapper.syntax.yaml'
170+ vars :
171+ scopename : string.regexp.quoted.multi.python
172+ prefix : ' double-three-'
173+ basename : ' fregexp'
174+ nested : " - include: '#comments-string-double-three'"
175+ modifier : ' [fF]'
176+ bquote : ' (""")'
177+ equote : ' (""")'
178+
63179 - file : ' pystring.inc.syntax.yaml'
64180 vars :
65181 line : single
@@ -509,68 +625,14 @@ repository:
509625
510626 regexp :
511627 patterns :
512- - include : ' #regexp-single-quoted-multi-line'
513- - include : ' #regexp-double-quoted-multi-line'
514- - include : ' #regexp-single-quoted-single-line'
515- - include : ' #regexp-double-quoted-single-line'
516-
517- regexp-single-quoted-single-line :
518- name : string.regexp.quoted.single.python
519- begin : \b(([uU]r)|([bBfF]r)|(r[bBfF]?))(\')
520- end : (\')|(?<!\\)(\n)
521- beginCaptures :
522- ' 2 ' : {name: invalid.deprecated.prefix.python}
523- ' 3 ' : {name: storage.type.string.python}
524- ' 4 ' : {name: storage.type.string.python}
525- ' 5 ' : {name: punctuation.definition.string.begin.python}
526- endCaptures :
527- ' 1 ' : {name: punctuation.definition.string.end.python}
528- ' 2 ' : {name: invalid.illegal.newline.python}
529- patterns :
530- - include : ' #single-one-regexp-expression'
531-
532- regexp-double-quoted-single-line :
533- name : string.regexp.quoted.single.python
534- begin : \b(([uU]r)|([bBfF]r)|(r[bBfF]?))(\")
535- end : (\")|(?<!\\)(\n)
536- beginCaptures :
537- ' 2 ' : {name: invalid.deprecated.prefix.python}
538- ' 3 ' : {name: storage.type.string.python}
539- ' 4 ' : {name: storage.type.string.python}
540- ' 5 ' : {name: punctuation.definition.string.begin.python}
541- endCaptures :
542- ' 1 ' : {name: punctuation.definition.string.end.python}
543- ' 2 ' : {name: invalid.illegal.newline.python}
544- patterns :
545- - include : ' #double-one-regexp-expression'
546-
547- regexp-single-quoted-multi-line :
548- name : string.regexp.quoted.multi.python
549- begin : \b(([uU]r)|([bBfF]r)|(r[bBfF]?))(\'\'\')
550- end : \'\'\'
551- beginCaptures :
552- ' 2 ' : {name: invalid.deprecated.prefix.python}
553- ' 3 ' : {name: storage.type.string.python}
554- ' 4 ' : {name: storage.type.string.python}
555- ' 5 ' : {name: punctuation.definition.string.begin.python}
556- endCaptures :
557- ' 0 ' : {name: punctuation.definition.string.end.python}
558- patterns :
559- - include : ' #single-three-regexp-expression'
560-
561- regexp-double-quoted-multi-line :
562- name : string.regexp.quoted.multi.python
563- begin : \b(([uU]r)|([bBfF]r)|(r[bBfF]?))(\"\"\")
564- end : \"\"\"
565- beginCaptures :
566- ' 2 ' : {name: invalid.deprecated.prefix.python}
567- ' 3 ' : {name: storage.type.string.python}
568- ' 4 ' : {name: storage.type.string.python}
569- ' 5 ' : {name: punctuation.definition.string.begin.python}
570- endCaptures :
571- ' 0 ' : {name: punctuation.definition.string.end.python}
572- patterns :
573- - include : ' #double-three-regexp-expression'
628+ - include : ' #regexp-single-three-line'
629+ - include : ' #regexp-double-three-line'
630+ - include : ' #regexp-single-one-line'
631+ - include : ' #regexp-double-one-line'
632+ - include : ' #fregexp-single-three-line'
633+ - include : ' #fregexp-double-three-line'
634+ - include : ' #fregexp-single-one-line'
635+ - include : ' #fregexp-double-one-line'
574636
575637 string :
576638 patterns :
@@ -718,14 +780,21 @@ repository:
718780 (?x) \{ [^'"}\n]*? \} (?=.*?\})
719781
720782 fstring-formatting :
783+ patterns :
784+ - include : ' #fstring-formatting-braces'
785+ - include : ' #fstring-formatting-singe-brace'
786+
787+ fstring-formatting-braces :
721788 patterns :
722789 - comment : empty braces are illegal
723790 name : invalid.illegal.brace.python
724791 match : ({\s*?})
725792 - name : constant.character.escape.python
726793 match : ({{|}})
727- - name : invalid.illegal.brace.python
728- match : (}(?!}))
794+
795+ fstring-formatting-singe-brace :
796+ name : invalid.illegal.brace.python
797+ match : (}(?!}))
729798
730799 import :
731800 comment : |
0 commit comments