@@ -38,6 +38,30 @@ repository:
3838 marker : ' |(?=""")'
3939 nested : " - include: '#comments'"
4040
41+ - file : ' pystring.inc.yaml'
42+ vars :
43+ quote : single
44+ line : single
45+ marker : " \\ '"
46+
47+ - file : ' pystring.inc.yaml'
48+ vars :
49+ quote : single
50+ line : multi
51+ marker : " \\ '\\ '\\ '"
52+
53+ - file : ' pystring.inc.yaml'
54+ vars :
55+ quote : double
56+ line : single
57+ marker : ' \"'
58+
59+ - file : ' pystring.inc.yaml'
60+ vars :
61+ quote : double
62+ line : multi
63+ marker : ' \"\"\"'
64+
4165 comments :
4266 name : comment.line.number-sign.python
4367 match : (\#)\s*(BUG|FIXME|TODO|XXX|NB)?.*
@@ -344,225 +368,17 @@ repository:
344368 - include : ' #string-raw-bin-single-quoted-single-line'
345369 - include : ' #string-raw-bin-double-quoted-single-line'
346370
347- string-single-quoted-single-line :
348- name : string.quoted.single.python
349- begin : (\b[rR](?=[uU]))?([uU])?(\')
350- end : (\')|(?<!\\)(\n)
351- beginCaptures :
352- ' 1 ' : {name: invalid.illegal.prefix.python}
353- ' 2 ' : {name: storage.type.string.python}
354- ' 3 ' : {name: punctuation.definition.string.begin.python}
355- endCaptures :
356- ' 1 ' : {name: punctuation.definition.string.end.python}
357- ' 2 ' : {name: invalid.illegal.newline.python}
358- patterns :
359- - include : ' #string-unicode-guts'
360-
361- string-double-quoted-single-line :
362- name : string.quoted.double.python
363- begin : (\b[rR](?=[uU]))?([uU])?(\")
364- end : (\")|(?<!\\)(\n)
365- beginCaptures :
366- ' 1 ' : {name: invalid.illegal.prefix.python}
367- ' 2 ' : {name: storage.type.string.python}
368- ' 3 ' : {name: punctuation.definition.string.begin.python}
369- endCaptures :
370- ' 1 ' : {name: punctuation.definition.string.end.python}
371- ' 2 ' : {name: invalid.illegal.newline.python}
372- patterns :
373- - include : ' #string-unicode-guts'
374-
375- string-single-quoted-multi-line :
376- name : string.quoted.triple.python
377- begin : (\b[rR](?=[uU]))?([uU])?(\'\'\')
378- end : \'\'\'
379- beginCaptures :
380- ' 1 ' : {name: invalid.illegal.prefix.python}
381- ' 2 ' : {name: storage.type.string.python}
382- ' 3 ' : {name: punctuation.definition.string.begin.python}
383- endCaptures :
384- ' 0 ' : {name: punctuation.definition.string.end.python}
385- patterns :
386- - include : ' #string-unicode-guts'
387-
388- string-double-quoted-multi-line :
389- name : string.quoted.triple.python
390- begin : (\b[rR](?=[uU]))?([uU])?(\"\"\")
391- end : \"\"\"
392- beginCaptures :
393- ' 1 ' : {name: invalid.illegal.prefix.python}
394- ' 2 ' : {name: storage.type.string.python}
395- ' 3 ' : {name: punctuation.definition.string.begin.python}
396- endCaptures :
397- ' 0 ' : {name: punctuation.definition.string.end.python}
398- patterns :
399- - include : ' #string-unicode-guts'
400-
401371 string-unicode-guts :
402372 patterns :
403373 - include : ' #escape-sequence-unicode'
404374 - include : ' #string-entity'
405375
406- string-bin-single-quoted-single-line :
407- name : string.quoted.single.python
408- begin : (\b[bB])(\')
409- end : (\')|(?<!\\)(\n)
410- beginCaptures :
411- ' 1 ' : {name: storage.type.string.python}
412- ' 2 ' : {name: punctuation.definition.string.begin.python}
413- endCaptures :
414- ' 1 ' : {name: punctuation.definition.string.end.python}
415- ' 2 ' : {name: invalid.illegal.newline.python}
416- patterns :
417- - include : ' #string-entity'
418-
419- string-bin-double-quoted-single-line :
420- name : string.quoted.double.python
421- begin : (\b[bB])(\")
422- end : (\")|(?<!\\)(\n)
423- beginCaptures :
424- ' 1 ' : {name: storage.type.string.python}
425- ' 2 ' : {name: punctuation.definition.string.begin.python}
426- endCaptures :
427- ' 1 ' : {name: punctuation.definition.string.end.python}
428- ' 2 ' : {name: invalid.illegal.newline.python}
429- patterns :
430- - include : ' #string-entity'
431-
432- string-bin-single-quoted-multi-line :
433- name : string.quoted.triple.python
434- begin : (\b[bB])(\'\'\')
435- end : \'\'\'
436- beginCaptures :
437- ' 1 ' : {name: storage.type.string.python}
438- ' 2 ' : {name: punctuation.definition.string.begin.python}
439- endCaptures :
440- ' 0 ' : {name: punctuation.definition.string.end.python}
441- patterns :
442- - include : ' #string-entity'
443-
444- string-bin-double-quoted-multi-line :
445- name : string.quoted.triple.python
446- begin : (\b[bB])(\"\"\")
447- end : \"\"\"
448- beginCaptures :
449- ' 1 ' : {name: storage.type.string.python}
450- ' 2 ' : {name: punctuation.definition.string.begin.python}
451- endCaptures :
452- ' 0 ' : {name: punctuation.definition.string.end.python}
453- patterns :
454- - include : ' #string-entity'
455-
456- string-raw-single-quoted-single-line :
457- name : string.quoted.single.raw.python
458- begin : \b(([uU]R)|(R))(\')
459- end : (\')|(?<!\\)(\n)
460- beginCaptures :
461- ' 2 ' : {name: invalid.deprecated.prefix.python}
462- ' 3 ' : {name: storage.type.string.python}
463- ' 4 ' : {name: punctuation.definition.string.begin.python}
464- endCaptures :
465- ' 1 ' : {name: punctuation.definition.string.end.python}
466- ' 2 ' : {name: invalid.illegal.newline.python}
467- patterns :
468- - include : ' #string-raw-guts'
469-
470- string-raw-double-quoted-single-line :
471- name : string.quoted.double.raw.python
472- begin : \b(([uU]R)|(R))(\")
473- end : (\")|(?<!\\)(\n)
474- beginCaptures :
475- ' 2 ' : {name: invalid.deprecated.prefix.python}
476- ' 3 ' : {name: storage.type.string.python}
477- ' 4 ' : {name: punctuation.definition.string.begin.python}
478- endCaptures :
479- ' 1 ' : {name: punctuation.definition.string.end.python}
480- ' 2 ' : {name: invalid.illegal.newline.python}
481- patterns :
482- - include : ' #string-raw-guts'
483-
484- string-raw-single-quoted-multi-line :
485- name : string.quoted.triple.raw.python
486- begin : \b(([uU]R)|(R))(\'\'\')
487- end : \'\'\'
488- beginCaptures :
489- ' 2 ' : {name: invalid.deprecated.prefix.python}
490- ' 3 ' : {name: storage.type.string.python}
491- ' 4 ' : {name: punctuation.definition.string.begin.python}
492- endCaptures :
493- ' 0 ' : {name: punctuation.definition.string.end.python}
494- patterns :
495- - include : ' #string-raw-guts'
496-
497- string-raw-double-quoted-multi-line :
498- name : string.quoted.triple.raw.python
499- begin : \b(([uU]R)|(R))(\"\"\")
500- end : \"\"\"
501- beginCaptures :
502- ' 2 ' : {name: invalid.deprecated.prefix.python}
503- ' 3 ' : {name: storage.type.string.python}
504- ' 4 ' : {name: punctuation.definition.string.begin.python}
505- endCaptures :
506- ' 0 ' : {name: punctuation.definition.string.end.python}
507- patterns :
508- - include : ' #string-raw-guts'
509-
510376 string-raw-guts :
511377 patterns :
512378 - match : \\.
513379 - include : ' #string-formatting'
514380 - include : ' #string-brace-formatting'
515381
516- string-raw-bin-single-quoted-single-line :
517- name : string.quoted.single.raw.python
518- begin : (\b(?:R[bB]|[bB]R))(\')
519- end : (\')|(?<!\\)(\n)
520- beginCaptures :
521- ' 1 ' : {name: storage.type.string.python}
522- ' 2 ' : {name: punctuation.definition.string.begin.python}
523- endCaptures :
524- ' 1 ' : {name: punctuation.definition.string.end.python}
525- ' 2 ' : {name: invalid.illegal.newline.python}
526- patterns :
527- - include : ' #string-raw-bin-guts'
528-
529- string-raw-bin-double-quoted-single-line :
530- name : string.quoted.double.raw.python
531- begin : (\b(?:R[bB]|[bB]R))(\")
532- end : (\")|(?<!\\)(\n)
533- beginCaptures :
534- ' 1 ' : {name: storage.type.string.python}
535- ' 2 ' : {name: punctuation.definition.string.begin.python}
536- endCaptures :
537- ' 1 ' : {name: punctuation.definition.string.end.python}
538- ' 2 ' : {name: invalid.illegal.newline.python}
539- patterns :
540- - include : ' #string-raw-bin-guts'
541-
542- string-raw-bin-single-quoted-multi-line :
543- name : string.quoted.triple.raw.python
544- begin : (\b(?:R[bB]|[bB]R))(\'\'\')
545- end : \'\'\'
546- beginCaptures :
547- ' 1 ' : {name: storage.type.string.python}
548- ' 2 ' : {name: punctuation.definition.string.begin.python}
549- endCaptures :
550- ' 0 ' : {name: punctuation.definition.string.end.python}
551- patterns :
552- - include : ' #string-raw-bin-guts'
553-
554- string-raw-bin-double-quoted-multi-line :
555- name : string.quoted.triple.raw.python
556- begin : (\b(?:R[bB]|[bB]R))(\"\"\")
557- end : \"\"\"
558- beginCaptures :
559- ' 1 ' : {name: storage.type.string.python}
560- ' 2 ' : {name: punctuation.definition.string.begin.python}
561- endCaptures :
562- ' 0 ' : {name: punctuation.definition.string.end.python}
563- patterns :
564- - include : ' #string-raw-bin-guts'
565-
566382 string-raw-bin-guts :
567383 patterns :
568384 - match : \\.
0 commit comments