comment Copyright (C) 2013 - 2017 Peter Varo <http://github.com/petervaro/python> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program, most likely a file in the root directory, called "LICENSE". If not, see <http://www.gnu.org/licenses>. fileTypes py firstLineMatch ^#!/.*\bpython[\d.-]*\b foldingStartMarker ^\s*(def|class)\s+([.\w>]+)\s*(\((.*)\))?\s*:|\{\s*$|\(\s*$|\[\s*$|^\s*"""(?=.)(?!.*""") foldingStopMarker ^\s*$|^\s*\}|^\s*\]|^\s*\)|^\s*"""\s*$ keyEquivalent ^~P name Python3 patterns include #comment match \b0b[01]+ name constant.numeric.integer.binary.python.3 match \b0x\h+ name constant.numeric.integer.hexadecimal.python.3 match \b0o[0-7]+ name constant.numeric.integer.octal.python.3 match (?<=\W|^)\.\d+([eE][+-]?\d+)?[jJ]? name constant.numeric.float_and_complex.decimal.floatnumber.python.3 match \d+\.(\d*([eE][+-]?\d+)?)?[jJ]?(?=\W) name constant.numeric.float_and_complex.decimal.pointfloat.python.3 match (?<![\.\d])\d+[eE][+-]?\d+[jJ]? name constant.numeric.float_and_complex.decimal.exponent.python.3 match \b(?<!\.)([1-9]\d*|0)[jJ]? name constant.numeric.integer_and_complex.decimal.python.3 match \b(global|nonlocal)\b name storage.modifier.declaration.python.3 match \b(async|await)\b name storage.modifier.coroutine.python.3 match \b(import|from)\b name keyword.control.import_and_import_from.python.3 match \b(elif|else|except|finally|for|if|try|while|with|break|continue|pass|raise|return|yield)\b name keyword.control.flow_block_delimiters.python.3 match \b(and|in|is|not|or)\b name keyword.operator.bool.logical.python.3 match \b(as|assert|del)\b name keyword.other.python.3 match <=|>=|==|<|>|!= name keyword.operator.comparison.python.3 match \+=|-=|\*=|/=|//=|%=|&=|\|=|\^=|<<=|>>=|\*\*= name keyword.operator.assignment.augmented.python.3 match \+|-|\*|\*\*|/|//|%|<<|>>|&|\||\^|~ name keyword.operator.arithmetic.python.3 match =|-> name keyword.operator.value_and_annotation_assignment.python.3 begin ^\s*(class)\s+(?=[a-zA-Z_]\w*(\s*\()?) beginCaptures 1 name storage.type.class.python.3 end (\)?\s*:|\s+([\w#\s:]+)) endCaptures 3 name invalid.illegal.missing_section_begin.python.3 name meta.class.python.3 patterns include #class_entity_name include #class_inheritance begin ^\s*(async\s)?\s*(def)\s+(?=[a-zA-Z_]\w*\s*\() beginCaptures 1 name storage.modifier.coroutine.python.3 2 name storage.type.function.python.3 end (\s*:) endCaptures 2 name invalid.illegal.missing_section_begin.python.3 name meta.function.python.3 patterns include #function_entity_name include #function_arguments include #function_annotation begin \b(lambda)\b beginCaptures 1 name storage.type.function.anonymous.python.3 end : name meta.function.anonymous.python.3 patterns begin \s+ end (?=:) patterns begin \b([a-zA-Z_]\w*)\s*(=) beginCaptures 1 name variable.parameter.function.python.3 2 name keyword.operator.assignment.python.3 end (?=,|:) patterns include $self match \b[a-zA-Z_]\w* name variable.parameter.function.python.3 begin ^\s*(@\s*[a-zA-Z_]\w*(\.[a-zA-Z_]\w*)*)\s*\( beginCaptures 1 name support.function.decorator.python.3 end \) name meta.function.decorator.with_arguments.python.3 patterns include #keyword_arguments include $self begin ^\s*(@\s*[a-zA-Z_]\w*(\.[a-zA-Z_]\w*)*) beginCaptures 1 name support.function.decorator.python.3 end (?=\s|$\n?|#) name meta.function.decorator.without_arguments.python.3 match @ name keyword.operator.arithmetic.python.3 match \b(None|True|False|Ellipsis|NotImplemented)\b name constant.language.word_like.python.3 match (?<=\W|^)\.\.\.(?=\W|$) name constant.language.symbol_like.python.3 match \b(def|lambda)\b name storage.type.function.python.3 match \b(class)\b name storage.type.class.python.3 include #builtin_types include #builtin_functions include #builtin_exceptions include #magic_function_names include #magic_variable_names include #line_continuation include #language_variables begin \[ end \] name meta.structure.list.python.3 patterns begin (?<=\[|,)\s*(?![\],]) end \s*(?:,|(?=\])) patterns include $self begin \{ end \} name meta.structure.dictionary.python.3 patterns begin (?<=\{|,|^)\s*(?![,}]) end \s*(?:(?=\})|:) patterns include $self begin (?<=:|^)\s* end \s*(?:(?=\})|,) patterns include $self begin (?<=,|;|=|\+|-|\*|/|\||:|<|>|~|%|\^|\\)\s*\( end \) name meta.structure.group.python.3 patterns include $self begin (?<!:|,|;|\[|\{|\}|=|\+|-|\*|/|\||<|>|~|%|\^|\\|\n)\s*\( end \) name meta.function_call.python.3 patterns include #keyword_arguments include $self include #f_string_quoted include #string_quoted_regex include #string_quoted repository builtin_exceptions match (?<!\.)\b((Arithmetic|Buffer|Lookup|Assertion|Attribute|EOF|FloatingPoint|Import|Index|Key|Memory|Name|NotImplemented|OS|Overflow|Reference|Runtime|Syntax|Indentation|Tab|System|Type|UnboundLocal|Unicode|Unicode(Encode|Decode|Translate)?|Value|ZeroDivision|Environment|IO|VMS|Windows|BlockingIO|ChildProcess|BrokenPipe|Connection(Aborted|Refused|Reset)?|FileExists|FileNotFound|Interrupted|(Is|Not)ADirectory|Permission|ProcessLookup|Timeout)Error|(User|Deprecation|PendingDeprecation|Syntax|Runtime|Future|Import|Bytes|Resource)Warning|(Base)?Exception|(Generator|System)Exit|KeyboardInterrupt|Stop(Async)?Iteration|Warning)\b name support.type.exception.python.3 builtin_functions match (?<!\.)\b(__import__|abs|all|any|ascii|bin|callable|chr|compile|delattr|dir|divmod|eval|exec|filter|format|getattr|globals|hasattr|hash|help|hex|id|input|isinstance|issubclass|iter|len|locals|map|max|min|next|oct|ord|pow|print|range|repr|round|setattr|sorted|sum|vars|zip)\b name support.function.builtin.python.3 builtin_types match (?<!\.)\b(basestring|bool|bytearray|bytes|classmethod|complex|dict|enumerate|float|frozenset|int|list|memoryview|object|open|property|reversed|set|slice|staticmethod|str|super|tuple|type)\b name support.type.python.3 class_entity_name begin (?=[a-zA-Z_]\w*) contentName entity.name.type.class.python.3 end (?!\w) patterns include #entity_name_class class_inheritance begin \( contentName meta.class.inheritance.python.3 end \)|: patterns begin (?<=\(|,)\s* contentName entity.other.inherited-class.python.3 end \s*(?:,|(?=\))) endCaptures 1 name punctuation.separator.inheritance.python.3 patterns include $self comment patterns match #.*$\n? name comment.line.hashmark.python.3 comment_extended_fmt begin (?i)(#(#|\s)*syntax:fmt)$ beginCaptures 1 name comment.line.hashmark.extended.fmt.open.python.3 end (?i)(#(#|\s)*end:fmt)$ endCaptures 1 name comment.line.hashmark.extended.fmt.close.python.3 name meta.syntax.comment.line.hashmark.extended.fmt.python.3 patterns include #string_quoted_format include $self comment_extended_old begin (?i)(#(#|\s)*syntax:old)$ beginCaptures 1 name comment.line.hashmark.extended.fmt.open.python.3 end (?i)(#(#|\s)*end:old)$ endCaptures 1 name comment.line.hashmark.extended.fmt.close.python.3 name meta.syntax.comment.line.hashmark.extended.fmt.python.3 patterns include #string_quoted_old include $self comment_extended_re begin (?i)(#(#|\s)*syntax:re)$ beginCaptures 1 name comment.line.hashmark.extended.re.open.python.3 end (?i)(#(#|\s)*end:re)$ endCaptures 1 name comment.line.hashmark.extended.re.close.python.3 name meta.syntax.comment.line.hashmark.extended.re.python.3 patterns include #string_quoted_regex include $self comment_extended_tmp begin (?i)(#(#|\s)*syntax:tmp)$ beginCaptures 1 name comment.line.hashmark.extended.tmp.open.python.3 end (?i)(#(#|\s)*end:tmp)$ endCaptures 1 name comment.line.hashmark.extended.tmp.close.python.3 name meta.syntax.comment.line.hashmark.extended.tmp.python.3 patterns include #string_quoted_template include $self constant_placeholder match %(\(\w+\))?#?0?-?[ ]?\+?(\d*|\*)(\.(\d*|\*))?[hlL]?[diouxXeEfFgGcrs%] name string.interpolated.placeholder.python.3 entity_name_class patterns include #illegal_names include #generic_names entity_name_function patterns include #magic_function_names include #illegal_names include #generic_names escaped_characters match \\(x\h{2}|[0-7]{3}|\n|\"|\'|a|b|f|n|r|t|v|\\) name constant.character.escaped.special.python.3 escaped_characters_raw match \\(\'|") name constant.character.escaped.raw.special.python.3 escaped_unicode_characters match \\(u\h{4}|U\h{8}|N\{[a-zA-Z\s]+\}) name constant.character.escaped.python.3 f_string_quoted patterns begin ([fF])''' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end ''' name string.quoted.single.block.fmt.python.3 patterns include #string_patterns include #format_specifier_extended begin ([rR][fF]|[fF][rR])''' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end ''' name string.quoted.single.block.fmt.python.3 patterns include #escaped_characters_raw include #format_specifier_extended begin ([fF])' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end '|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.single.line.fmt.python.3 patterns include #string_patterns include #format_specifier_extended begin ([rR][fF]|[fF][rR])' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end '|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.single.line.fmt.python.3 patterns include #escaped_characters_raw include #format_specifier_extended begin ([fF])""" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end """ name string.quoted.double.block.fmt.python.3 patterns include #string_patterns include #format_specifier_extended begin ([rR][fF]|[fF][rR])""" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end """ name string.quoted.double.block.fmt.python.3 patterns include #escaped_characters_raw include #format_specifier_extended begin ([fF])" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end "|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.double.line.fmt.python.3 patterns include #string_patterns include #format_specifier_extended begin ([rR][fF]|[fF][rR])" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end "|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.double.line.fmt.python.3 patterns include #escaped_characters_raw include #format_specifier_extended format_escape match ({{|}}) name constant.character.escape.fmt.python.3 format_specifier patterns include #format_escape begin ({)(\w*(\.\w+)*)?(!(a|r|s))? beginCaptures 1 name string.interpolated.brace.fmt.python.3 2 name variable.parameter.subscriptor.fmt.python.3 4 name keyword.operator.exclamation.fmt.python.3 5 name support.constant.ascii_repr_str.fmt.python.3 end (}) endCaptures 1 name string.interpolated.brace.fmt.python.3 name meta.interpolated.format.string.python.3 patterns begin (:) beginCaptures 1 name keyword.operator.colon.fmt.python.3 end (?=}) name meta.interpolated.format.specifier.python.3 patterns include #format_specifier_fill_align include #format_specifier_sign include #format_specifier_alternate_form include #format_specifier_zero_padding include #format_specifier_width include #format_specifier_thousand_separator include #format_specifier_precision include #format_specifier_type include #format_specifier include #format_specifier format_specifier_alternate_form begin (#) beginCaptures 1 name support.constant.alternate.fmt.python.3 end (?=}) name meta.alternate.fmt.python.3 patterns include #format_specifier_zero_padding include #format_specifier_width include #format_specifier_thousand_separator include #format_specifier_precision include #format_specifier_type include #format_specifier format_specifier_extended patterns include #format_escape begin ({) beginCaptures 1 name string.interpolated.brace.fmt.python.3 end (}) endCaptures 1 name string.interpolated.brace.fmt.python.3 name meta.interpolated.format.fstring.python.3 patterns include #format_specifier_extended_self include #format_specifier_extended_ascii_repr_str include #format_specifier_extended_colon include #format_specifier_extended_fill_align include #format_specifier_extended_sign include #format_specifier_extended_alternate_form include #format_specifier_extended_zero_padding include #format_specifier_extended_width include #format_specifier_extended_thousand_separator include #format_specifier_extended_precision include #format_specifier_extended_type include #format_specifier_extended format_specifier_extended_alternate_form begin (#) beginCaptures 1 name support.constant.alternate.fmt.python.3 end (?=}) name meta.alternate.fmt.python.3 patterns include #format_specifier_extended_zero_padding include #format_specifier_extended_width include #format_specifier_extended_thousand_separator include #format_specifier_extended_precision include #format_specifier_extended_type include #format_specifier_extended format_specifier_extended_ascii_repr_str patterns begin (!(a|r|s)) beginCaptures 1 name keyword.operator.exclamation.fmt.python.3 2 name support.constant.ascii_repr_str.fmt.python.3 end (?=}) name meta.ascii_repr_str.python.3 patterns include #format_specifier_extended_colon include #format_specifier_extended_fill_align include #format_specifier_extended_sign include #format_specifier_extended_alternate_form include #format_specifier_extended_zero_padding include #format_specifier_extended_width include #format_specifier_extended_thousand_separator include #format_specifier_extended_precision include #format_specifier_extended_type include #format_specifier_extended format_specifier_extended_colon patterns begin (:) beginCaptures 1 name keyword.operator.colon.fmt.python.3 end (?=}) name meta.colon.python.3 patterns include #format_specifier_extended_fill_align include #format_specifier_extended_sign include #format_specifier_extended_alternate_form include #format_specifier_extended_zero_padding include #format_specifier_extended_width include #format_specifier_extended_thousand_separator include #format_specifier_extended_precision include #format_specifier_extended_type include #format_specifier_extended format_specifier_extended_fill_align begin ([^{}]?(<|>|=|\^)) beginCaptures 1 name string.quoted.fill_char.fmt.python.3 2 name keyword.operator.align.fmt.python.3 end (?=}) name meta.fill_char.fmt.python.3 patterns include #format_specifier_extended_sign include #format_specifier_extended_alternate_form include #format_specifier_extended_zero_padding include #format_specifier_extended_width include #format_specifier_extended_thousand_separator include #format_specifier_extended_precision include #format_specifier_extended_type include #format_specifier_extended format_specifier_extended_precision begin (\.\d+) beginCaptures 1 name constant.character.precision.fmt.python.3 end (?=}) name meta.precision.fmt.python.3 patterns include #format_specifier_extended_type include #format_specifier_extended format_specifier_extended_self patterns begin (?<={) end (?=!|:|}) name meta.self.python.3 patterns include $self format_specifier_extended_sign begin (\+|-|\s) beginCaptures 1 name keyword.operator.sign.fmt.python.3 end (?=}) name meta.sign.fmt.python.3 patterns include #format_specifier_extended_alternate_form include #format_specifier_extended_zero_padding include #format_specifier_extended_width include #format_specifier_extended_thousand_separator include #format_specifier_extended_precision include #format_specifier_extended_type include #format_specifier_extended format_specifier_extended_thousand_separator begin (,) beginCaptures 1 name keyword.operator.thousand_separator.fmt.python.3 end (?=}) name meta.thousand_separator.fmt.python.3 patterns include #format_specifier_extended_precision include #format_specifier_extended_type include #format_specifier_extended format_specifier_extended_type begin (b|c|d|e|E|f|F|g|G|n|o|s|x|X|%) beginCaptures 1 name constant.character.escape.type.fmt.python.3 end (?=}) name meta.type.fmt.python.3 patterns include #format_specifier_extended format_specifier_extended_width begin (\d+) beginCaptures 1 name constant.character.width.fmt.python.3 end (?=}) name meta.width.fmt.python.3 patterns include #format_specifier_extended_thousand_separator include #format_specifier_extended_precision include #format_specifier_extended_type include #format_specifier_extended format_specifier_extended_zero_padding begin (0) beginCaptures 1 name constant.character.escape.zero_padding.fmt.python.3 end (?=}) name meta.zero_padding.fmt.python.3 patterns include #format_specifier_extended_width include #format_specifier_extended_thousand_separator include #format_specifier_extended_precision include #format_specifier_extended_type include #format_specifier_extended format_specifier_fill_align begin ([^{}]?(<|>|=|\^)) beginCaptures 1 name string.quoted.fill_char.fmt.python.3 2 name keyword.operator.align.fmt.python.3 end (?=}) name meta.fill_char.fmt.python.3 patterns include #format_specifier_sign include #format_specifier_alternate_form include #format_specifier_zero_padding include #format_specifier_width include #format_specifier_thousand_separator include #format_specifier_precision include #format_specifier_type include #format_specifier format_specifier_precision begin (\.\d+) beginCaptures 1 name constant.character.precision.fmt.python.3 end (?=}) name meta.precision.fmt.python.3 patterns include #format_specifier_type include #format_specifier format_specifier_sign begin (\+|-|\s) beginCaptures 1 name keyword.operator.sign.fmt.python.3 end (?=}) name meta.sign.fmt.python.3 patterns include #format_specifier_alternate_form include #format_specifier_zero_padding include #format_specifier_width include #format_specifier_thousand_separator include #format_specifier_precision include #format_specifier_type include #format_specifier format_specifier_thousand_separator begin (,) beginCaptures 1 name keyword.operator.thousand_separator.fmt.python.3 end (?=}) name meta.thousand_separator.fmt.python.3 patterns include #format_specifier_precision include #format_specifier_type include #format_specifier format_specifier_type begin (b|c|d|e|E|f|F|g|G|n|o|s|x|X|%) beginCaptures 1 name constant.character.escape.type.fmt.python.3 end (?=}) name meta.type.fmt.python.3 patterns include #format_specifier format_specifier_width begin (\d+) beginCaptures 1 name constant.character.width.fmt.python.3 end (?=}) name meta.width.fmt.python.3 patterns include #format_specifier_thousand_separator include #format_specifier_precision include #format_specifier_type include #format_specifier format_specifier_zero_padding begin (0) beginCaptures 1 name constant.character.escape.zero_padding.fmt.python.3 end (?=}) name meta.zero_padding.fmt.python.3 patterns include #format_specifier_width include #format_specifier_thousand_separator include #format_specifier_precision include #format_specifier_type include #format_specifier function_annotation begin (?<=\))\s*(->)\s* beginCaptures 1 name keyword.operator.annotation.assignment.python.3 end (?=\s*:) patterns include $self function_arguments begin \( end (?=\)) patterns include #comment begin \b([a-zA-Z_]\w*)\s*(=) beginCaptures 1 name variable.parameter.function.python.3 2 name keyword.operator.assignment.python.3 end (?=,|[\n)]) patterns begin (?<=(=))\s* beginCaptures 1 name keyword.operator.assignment.python.3 end (?=,|[\n)]) patterns include $self begin (?<=:)\s* end (?=,|(=)|[\n)]) endCaptures 1 name keyword.operator.assignment.python.3 patterns include $self begin \b([a-zA-Z_]\w*)\s* beginCaptures 1 name variable.parameter.function.python.3 end (?=,|[\n)]) patterns begin (?<=:)\s* end (?=,|[\n)]) patterns include $self function_entity_name begin (?=[a-zA-Z_]\w*) contentName entity.name.function.python.3 end (?!\w) patterns include #entity_name_function generic_names match [a-zA-Z_]\w* illegal_names match \b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|raise|return|try|while|with|yield)\b name invalid.illegal_names.name.python.3 keyword_arguments begin \b([a-zA-Z_]\w*)\s*(=)(?!=) beginCaptures 1 name variable.parameter.function.python.3 2 name keyword.operator.assignment.python.3 end (?=,|[\n)]) patterns include $self language_variables match (?<!\.)\b(self|cls)\b name variable.language.python.3 line_continuation captures 1 name punctuation.separator.continuation.line.python.3 2 name invalid.illegal.unexpected_text.python.3 match (\\)(.*)$\n? magic_function_names match \b__(abs|add|and|await|bool|bytes|call|ceil|complex|contains|copy|deepcopy|del|delattr|delete|delitem|dir|div|divmod|a?enter|eq|a?exit|float|floor|floordiv|format|ge|get|getattr|getattribute|getinitargs|getitem|getnewargs|getstate|gt|hash|hex|iadd|iand|idiv|ifloordiv|ilshift|imul|index|init|instancecheck|int|invert|ior|ipow|irshift|isub|a?iter|itruediv|ixor|le|len|lshift|lt|metaclass|missing|mod|mul|ne|neg|new|a?next|oct|or|pos|pow|prepare|radd|rand|rdiv|rdivmod|reduce|reduce_ex|repr|reversed|rfloordiv|rlshift|rmod|rmul|ror|round|rpow|rrshift|rshift|rsub|rtruediv|rxor|set|setattr|setitem|setstate|sizeof|str|sub|subclasscheck|subclasshook|truediv|trunc|unicode|weakref|xor)__\b name support.function.magic.python.3 magic_variable_names match \b__(all|annotations|bases|builtins|class|debug|dict|doc|file|members|metaclass|mro|name|qualname|slots|weakref)__\b name support.variable.magic.python.3 r_string_quoted patterns begin ([rR][bB]?|[bB][rR])''' beginCaptures 1 name storage.type.string.prefix.python.3 end ''' name string.quoted.single.block.python.3 patterns include #escaped_characters_raw begin ([rR][bB]?|[bB][rR])' beginCaptures 1 name storage.type.string.prefix.python.3 end '|(\n) endCaptures 1 name invalid.illegal.unclosed_string.python.3 name string.quoted.single.line.python.3 patterns include #escaped_characters_raw begin ([rR][bB]?|[bB][rR])""" beginCaptures 1 name storage.type.string.prefix.python.3 end """ name string.quoted.double.block.python.3 patterns include #escaped_characters_raw begin ([rR][bB]?|[bB][rR])" beginCaptures 1 name storage.type.string.prefix.python.3 end "|(\n) endCaptures 1 name invalid.illegal.unclosed_string.python.3 name string.quoted.double.line.python.3 patterns include #escaped_characters_raw regular_expressions patterns match (?<=\()\?(=|!|<=|<!|:|P<[a-zA-Z_]\w*?>|\(([1-9]\d?|[a-zA-Z_]\w*)\)) name constant.character.escape.python.3 captures 1 name constant.character.escape.python.3 match \((\?P=)([a-zA-Z_]\w*)\) name keyword.other.group_reference_name.regex.python.3 captures 1 name constant.character.escape.python.3 match (\\g)<([a-zA-Z_]\w*|[1-9]\d*)> name keyword.other.group_reference_name.regex.python.3 match \\[bBAZzG]|\^|\$ name keyword.control.anchor.regex.python.3 match \\[1-9]\d* name keyword.other.group_reference_order.regex.python.3 match [?+*][?+]?|\{(\d+,\d+|\d+,|,\d+|\d+)\}\?? name keyword.operator.quantifier.regex.python.3 match \| name keyword.operator.or.regex.python.3 begin \(\?# end \) name comment.block.regex.python.3 match \(\?[aiLmsux]+\) name keyword.other.option_toggle.regex.python.3 include #regular_expressions_escaped_characters include #regular_expressions_character_classes match [()] name keyword.operator.group.regex.python.3 regular_expressions_character_classes patterns match \\[wWsSdD]|\. name constant.character.character_class.regex.python.3 begin \[(\^)?(\](?=.*\]))? beginCaptures 1 name keyword.operator.negation.regex.python.3 end \] name constant.other.character_class.set.regex.python.3 patterns match \[|\\\\|\\\] name constant.character.escaped.special.regex.except.python.3 include #regular_expressions_character_classes include #regular_expressions_escaped_characters regular_expressions_escaped_characters match \\(\\|\?|\.|\*|\+|\{|\}|\||\(|\)|\[|\]|\^|\$) name constant.character.escaped.special.regex.python.3 string_patterns patterns include #escaped_characters include #escaped_unicode_characters string_quoted patterns begin ([bBuU]?)''' beginCaptures 1 name storage.type.string.prefix.python.3 end ''' name string.quoted.single.block.python.3 patterns include #string_patterns begin ([bBuU]?)' beginCaptures 1 name storage.type.string.prefix.python.3 end '|(\n) endCaptures 1 name invalid.illegal.unclosed_string.python.3 name string.quoted.single.line.python.3 patterns include #string_patterns begin ([bBuU]?)""" beginCaptures 1 name storage.type.string.prefix.python.3 end """ name string.quoted.double.block.python.3 patterns include #string_patterns begin ([bBuU]?)" beginCaptures 1 name storage.type.string.prefix.python.3 end "|(\n) endCaptures 1 name invalid.illegal.unclosed_string.python.3 name string.quoted.double.line.python.3 patterns include #string_patterns string_quoted_format patterns begin ([uUbB]?)''' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end ''' name string.quoted.single.block.fmt.python.3 patterns include #string_patterns include #format_specifier begin ([rR][bB]?|[bB][rR])''' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end ''' name string.quoted.single.block.fmt.python.3 patterns include #escaped_characters_raw include #format_specifier begin ([uUbB]?)' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end '|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.single.line.fmt.python.3 patterns include #string_patterns include #format_specifier begin ([rR][bB]?|[bB][rR])' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end '|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.single.line.fmt.python.3 patterns include #escaped_characters_raw include #format_specifier begin ([uUbB]?)""" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end """ name string.quoted.double.block.fmt.python.3 patterns include #string_patterns include #format_specifier begin ([rR][bB]?|[bB][rR])""" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end """ name string.quoted.double.block.fmt.python.3 patterns include #escaped_characters_raw include #format_specifier begin ([uUbB]?)" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end "|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.double.line.fmt.python.3 patterns include #string_patterns include #format_specifier begin ([rR][bB]?|[bB][rR])" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end "|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.double.line.fmt.python.3 patterns include #escaped_characters_raw include #format_specifier string_quoted_old patterns begin ([uUbB]?)''' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end ''' name string.quoted.single.block.fmt.python.3 patterns include #string_patterns include #constant_placeholder begin ([rR][bB]?|[bB][rR])''' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end ''' name string.quoted.single.block.fmt.python.3 patterns include #escaped_characters_raw include #constant_placeholder begin ([uUbB]?)' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end '|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.single.line.fmt.python.3 patterns include #string_patterns include #constant_placeholder begin ([rR][bB]?|[bB][rR])' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end '|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.single.line.fmt.python.3 patterns include #escaped_characters_raw include #constant_placeholder begin ([uUbB]?)""" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end """ name string.quoted.double.block.fmt.python.3 patterns include #string_patterns include #constant_placeholder begin ([rR][bB]?|[bB][rR])""" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end """ name string.quoted.double.block.fmt.python.3 patterns include #escaped_characters_raw include #constant_placeholder begin ([uUbB]?)" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end "|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.double.line.fmt.python.3 patterns include #string_patterns include #constant_placeholder begin ([rR][bB]?|[bB][rR])" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end "|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.double.line.fmt.python.3 patterns include #escaped_characters_raw include #constant_placeholder string_quoted_regex patterns begin ([rR][bB]?|[bB][rR])''' beginCaptures 1 name storage.type.string.prefix.re.python.3 end ''' name string.quoted.single.block.re.python.3 patterns include #string_patterns include #regular_expressions include #comment begin ([rR][bB]?|[bB][rR])' beginCaptures 1 name storage.type.string.prefix.re.python.3 end '|(\n) endCaptures 1 name invalid.illegal.unclosed_string.re.python.3 name string.quoted.single.line.re.python.3 patterns include #string_patterns include #regular_expressions begin ([rR][bB]?|[bB][rR])""" beginCaptures 1 name storage.type.string.prefix.re.python.3 end """ name string.quoted.double.block.re.python.3 patterns include #string_patterns include #regular_expressions include #comment begin ([rR][bB]?|[bB][rR])" beginCaptures 1 name storage.type.string.prefix.re.python.3 end "|(\n) endCaptures 1 name invalid.illegal.unclosed_string.re.python.3 name string.quoted.double.line.re.python.3 patterns include #string_patterns include #regular_expressions string_quoted_template patterns begin ([uUbB]?)''' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end ''' name string.quoted.single.block.fmt.python.3 patterns include #string_patterns include #template_string begin ([rR][bB]?|[bB][rR])''' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end ''' name string.quoted.single.block.fmt.python.3 patterns include #escaped_characters_raw include #template_string begin ([uUbB]?)' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end '|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.single.line.fmt.python.3 patterns include #string_patterns include #template_string begin ([rR][bB]?|[bB][rR])' beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end '|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.single.line.fmt.python.3 patterns include #escaped_characters_raw include #template_string begin ([uUbB]?)""" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end """ name string.quoted.double.block.fmt.python.3 patterns include #string_patterns include #template_string begin ([rR][bB]?|[bB][rR])""" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end """ name string.quoted.double.block.fmt.python.3 patterns include #escaped_characters_raw include #template_string begin ([uUbB]?)" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end "|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.double.line.fmt.python.3 patterns include #string_patterns include #template_string begin ([rR][bB]?|[bB][rR])" beginCaptures 1 name storage.type.string.prefix.fmt.python.3 end "|(\n) endCaptures 1 name invalid.illegal.unclosed_string.fmt.python.3 name string.quoted.double.line.fmt.python.3 patterns include #escaped_characters_raw include #template_string template_string match \$(\$|[a-zA-Z_]\w*|{[a-zA-Z_]\w*}) name string.interpolated.template.python.3 scopeName source.python.3 uuid 851B1429-B8B4-4C1E-8030-399BDA994393