|
103 | 103 | '1': |
104 | 104 | 'name': 'keyword.other.python.renpy' |
105 | 105 | 'comment': 'keywords that haven\'t fit into other groups (yet).' |
106 | | - 'match': '\\b(assert|del|exec|print)\\b' |
| 106 | + 'match': '\\b(assert|del|exec|print|match|case)\\b' |
107 | 107 | } |
108 | 108 | { |
109 | 109 | 'match': '<>' |
|
118 | 118 | 'name': 'keyword.operator.assignment.augmented.python.renpy' |
119 | 119 | } |
120 | 120 | { |
121 | | - 'match': '\\+|\\-|\\*|\\*\\*|/|//|%|<<|>>|&|\\||\\^|~' |
| 121 | + 'match': '\\+|\\-|\\*|\\*\\*|/|//|%|@|<<|>>|&|\\||\\^|~' |
122 | 122 | 'name': 'keyword.operator.arithmetic.python.renpy' |
123 | 123 | } |
124 | 124 | { |
125 | | - 'match': '\\=' |
| 125 | + 'match': '\\=|\\:\\=' |
126 | 126 | 'name': 'keyword.operator.assignment.python.renpy' |
127 | 127 | } |
128 | 128 | { |
|
400 | 400 | 'name' : 'keyword.python.renpy' |
401 | 401 | } |
402 | 402 | { |
403 | | - 'match' : '\\b(\\$|add|always|and|animation|as|assert|at|attribute|auto|bar|behind|block|break|button|call|camera|choice|circles|class|clear|clockwise|contains|continue|counterclockwise|def|default|define|del|drag|draggroup|elif|else|event|except|exec|expression|finally|fixed|for|frame|from|function|global|grid|group|has|hbox|hide|hotbar|hotspot|if|image|imagebutton|imagemap|import|in|index|init|input|is|jump|key|knot|label|lambda|layeredimage|menu|monologue|mousearea|music|new|nointeract|not|null|nvl|offset|old|on|onlayer|or|parallel|pass|pause|play|print|python|queue|raise|repeat|return|rpy|scene|screen|show|showif|side|sound|stop|strings|style|sustain|tag|take|testcase|text|textbutton|time|timer|transclude|transform|translate|try|use|vbar|vbox|viewport|voice|vpgrid|while|window|with|yield|zorder)\\b' |
| 403 | + 'match' : '\\b(\\$|add|always|and|animation|as|assert|at|attribute|auto|bar|behind|block|break|button|call|camera|choice|circles|class|clear|clockwise|contains|continue|counterclockwise|def|default|define|del|dismiss|drag|draggroup|elif|else|event|except|exec|expression|finally|fixed|for|frame|from|function|global|grid|group|has|hbox|hide|hotbar|hotspot|if|image|imagebutton|imagemap|import|in|index|init|input|is|jump|key|knot|label|lambda|layeredimage|menu|monologue|mousearea|music|nearrect|new|nointeract|not|null|nvl|offset|old|on|onlayer|or|parallel|pass|pause|play|print|python|queue|raise|repeat|return|rpy|scene|screen|show|showif|side|sound|stop|strings|style|sustain|tag|take|testcase|text|textbutton|time|timer|transclude|transform|translate|try|use|vbar|vbox|viewport|voice|vpgrid|while|window|with|yield|zorder)\\b' |
404 | 404 | 'name' : 'keyword.python.renpy' |
405 | 405 | } |
406 | 406 |
|
407 | 407 | { |
408 | | - 'match' : '\\b((?:action|activate_sound|activated|adjustment|allow|allow_underfull|alpha|alternate|alternate_keysym|arguments|arrowkeys|at|auto|cache|caption|changed|child_size|clicked|cols|copypaste|default|default_focus|drag_handle|drag_joined|drag_name|drag_offscreen|drag_raise|draggable|dragged|drop_allowable|droppable|dropped|edgescroll|exclude|focus|focus_mask|ground|height|hover|hovered|icon_tooltip|id|idle|image_style|insensitive|keysym|layer|length|mask|min_overlap|modal|mouse_drop|mousewheel|pagekeys|pixel_width|predict|prefix|properties|range|repeat|rows|scope|scrollbars|selected|selected_hover|selected_idle|selected_insensitive|sensitive|slow|slow_done|spacing|style|style_group|style_prefix|style_suffix|substitute|suffix|text_style|text_tooltip|tooltip|transpose|unhovered|value|variant|width|xadjustment|xinitial|yadjustment|yinitial|zorder))\\b' |
| 408 | + 'match' : '\\b((?:action|activate_sound|activated|adjustment|allow|allow_underfull|alpha|alt|alternate|alternate_keysym|arguments|arrowkeys|at|auto|cache|caption|capture|caret_blink|changed|child_size|clicked|cols|copypaste|default|default_focus|drag_handle|drag_joined|drag_name|drag_offscreen|drag_raise|draggable|dragged|dragging|drop_allowable|droppable|dropped|edgescroll|exclude|focus|focus_mask|ground|height|hover|hovered|icon_tooltip|id|idle|image_style|insensitive|keysym|layer|length|mask|min_overlap|modal|mouse_drop|mousewheel|pagekeys|pixel_width|predict|prefer_top|prefix|properties|range|rect|released|repeat|roll_forward|rows|scope|scrollbars|selected|selected_hover|selected_idle|selected_insensitive|sensitive|slow|slow_done|spacing|style|style_group|style_prefix|style_suffix|substitute|suffix|text_style|text_tooltip|tooltip|transpose|unhovered|value|variant|width|xadjustment|xinitial|yadjustment|yinitial|zorder))\\b' |
409 | 409 | 'name' : 'entity.other.attribute-name.python.renpy' |
410 | 410 | } |
411 | 411 |
|
412 | 412 | { |
413 | | - 'match' : '\\b((?:|activate_|hover_|idle_|insensitive_|selected_|selected_activate_|selected_hover_|selected_idle_|selected_insensitive_)(?:additive|adjust_spacing|align|alignaround|alpha|alt|anchor|angle|antialias|area|around|background|bar_invert|bar_resizing|bar_vertical|base_bar|black_color|blend|blur|bold|bottom_bar|bottom_gutter|bottom_margin|bottom_padding|box_layout|box_reverse|box_wrap|box_wrap_spacing|caret|child|clipping|color|corner1|corner2|crop|crop_relative|debug|delay|drop_shadow|drop_shadow_color|events|first_indent|first_spacing|fit|fit_first|focus_mask|font|foreground|gl_anisostropic|gl_blend_func|gl_color_mask|gl_depth|gl_mipmap|gl_pixel_perfect|gl_texture_wrap|hinting|hyperlink_functions|italic|justify|kerning|key_events|keyboard_focus|language|layout|left_bar|left_gutter|left_margin|left_padding|line_leading|line_spacing|margin|matrixanchor|matrixcolor|matrixtransform|maximum|maxsize|mesh|mesh_pad|min_width|minimum|minwidth|mipmap|modal|mouse|nearest|newline_indent|offset|order_reverse|outline_scaling|outlines|padding|perspective|pos|radius|rest_indent|right_bar|right_gutter|right_margin|right_padding|rotate|rotate_pad|ruby_style|shader|size|size_group|slow_abortable|slow_cps|slow_cps_multiplier|sound|spacing|strikethrough|subpixel|text_align|text_y_fudge|thumb|thumb_offset|thumb_shadow|top_bar|top_gutter|top_margin|top_padding|transform_anchor|underline|unscrollable|vertical|xalign|xanchor|xanchoraround|xaround|xcenter|xfill|xfit|xmargin|xmaximum|xminimum|xoffset|xpadding|xpan|xpos|xsize|xspacing|xtile|xysize|xzoom|yalign|yanchor|yanchoraround|yaround|ycenter|yfill|yfit|ymargin|ymaximum|yminimum|yoffset|ypadding|ypan|ypos|ysize|yspacing|ytile|yzoom|zoom|zpos|zzoom))\\b' |
| 413 | + 'match' : '\\b((?:|activate_|hover_|idle_|insensitive_|selected_|selected_activate_|selected_hover_|selected_idle_|selected_insensitive_)(?:additive|adjust_spacing|align|alignaround|alpha|alt|anchor|angle|antialias|area|around|background|bar_invert|bar_resizing|bar_vertical|base_bar|black_color|blend|blur|bold|bottom_bar|bottom_gutter|bottom_margin|bottom_padding|box_layout|box_reverse|box_wrap|box_wrap_spacing|caret|child|clipping|color|corner1|corner2|crop|crop_relative|debug|delay|drop_shadow|drop_shadow_color|events|first_indent|first_spacing|fit|fit_first|focus_mask|font|foreground|gl_anisotropic|gl_blend_func|gl_color_mask|gl_depth|gl_drawable_resolution|gl_mipmap|gl_pixel_perfect|gl_texture_scaling|gl_texture_wrap|hinting|hyperlink_functions|italic|justify|kerning|key_events|keyboard_focus|language|layout|left_bar|left_gutter|left_margin|left_padding|line_leading|line_spacing|margin|matrixanchor|matrixcolor|matrixtransform|maximum|maxsize|mesh|mesh_pad|min_width|minimum|minwidth|mipmap|modal|mouse|nearest|newline_indent|offset|order_reverse|outline_scaling|outlines|padding|perspective|pos|radius|rest_indent|right_bar|right_gutter|right_margin|right_padding|rotate|rotate_pad|ruby_style|shader|size|size_group|slow_abortable|slow_cps|slow_cps_multiplier|sound|spacing|strikethrough|subpixel|text_align|text_y_fudge|thumb|thumb_offset|thumb_shadow|top_bar|top_gutter|top_margin|top_padding|transform_anchor|underline|unscrollable|vertical|xalign|xanchor|xanchoraround|xaround|xcenter|xfill|xfit|xmargin|xmaximum|xminimum|xoffset|xpadding|xpan|xpos|xsize|xspacing|xtile|xycenter|xysize|xzoom|yalign|yanchor|yanchoraround|yaround|ycenter|yfill|yfit|ymargin|ymaximum|yminimum|yoffset|ypadding|ypan|ypos|ysize|yspacing|ytile|yzoom|zoom|zpos|zzoom))\\b' |
414 | 414 | 'name' : 'entity.other.attribute-name.python.renpy' |
415 | 415 | } |
416 | 416 |
|
|
746 | 746 | 'docstrings': |
747 | 747 | 'patterns': [ |
748 | 748 | { |
749 | | - 'begin': '^\\s*(?=[uU]?[rR]?""")' |
| 749 | + 'begin': '^\\s*(?=[fuUb]?[rR]?""")' |
750 | 750 | 'end': '(?<=""")' |
751 | 751 | 'name': 'comment.block.python.renpy' |
752 | 752 | 'patterns': [ |
|
756 | 756 | ] |
757 | 757 | } |
758 | 758 | { |
759 | | - 'begin': '^\\s*(?=[uU]?[rR]?\'\'\')' |
| 759 | + 'begin': '^\\s*(?=[fuUb]?[rR]?\'\'\')' |
760 | 760 | 'end': '(?<=\'\'\')' |
761 | 761 | 'name': 'comment.block.python.renpy' |
762 | 762 | 'patterns': [ |
|
902 | 902 | 'generic_names': |
903 | 903 | 'match': '[A-Za-z_][A-Za-z0-9_]*' |
904 | 904 | 'illegal_names': |
905 | | - 'match': '\\b(and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|global|if|import|in|is|lambda|nonlocal|not|or|print|raise|try|while|with|yield)\\b' |
| 905 | + 'match': '\\b(and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|global|if|import|in|is|lambda|nonlocal|not|or|print|raise|try|while|with|yield)\\b' |
906 | 906 | 'name': 'invalid.illegal.name.python.renpy' |
907 | 907 | 'keyword_arguments': |
908 | 908 | 'begin': '\\b([a-zA-Z_][a-zA-Z_0-9]*)\\s*(=)(?!=)' |
|
932 | 932 | 'match': '(\\\\)(.*)$\\n?' |
933 | 933 | 'magic_function_names': |
934 | 934 | 'comment': 'these methods have magic interpretation by python and are generally called indirectly through syntactic constructs' |
935 | | - 'match': '(?x)\\b(__(?:\n\t\t\t\t\t\tabs|add|and|cmp|coerce|complex|contains|del|delattr|\n\t\t\t\t\t\tdelete|delitem|delslice|div|divmod|enter|eq|exit|float|\n\t\t\t\t\t\tfloordiv|ge|get|getattr|getattribute|getitem|getslice|gt|\n\t\t\t\t\t\thash|hex|iadd|iand|idiv|ifloordiv|ilshift|imod|imul|init|\n\t\t\t\t\t\tint|invert|ior|ipow|irshift|isub|iter|itruediv|ixor|le|len|\n\t\t\t\t\t\tlong|lshift|lt|mod|mul|ne|neg|new|nonzero|oct|or|pos|pow|\n\t\t\t\t\t\tradd|rand|rdiv|rdivmod|repr|rfloordiv|rlshift|rmod|rmul|ror|\n\t\t\t\t\t\trpow|rrshift|rshift|rsub|rtruediv|rxor|set|setattr|setitem|\n\t\t\t\t\t\tsetslice|str|sub|truediv|unicode|xor\n\t\t\t\t\t)__)\\b' |
| 935 | + 'match': '(?x)\\b(__(?:abs|add|and|cmp|coerce|complex|contains|del|delattr|delete|delitem|delslice|div|divmod|enter|eq|exit|float|floordiv|ge|get|getattr|getattribute|getitem|getslice|gt|hash|hex|iadd|iand|idiv|ifloordiv|ilshift|imod|imul|init|int|invert|ior|ipow|irshift|isub|iter|itruediv|ixor|le|len|long|lshift|lt|mod|mul|ne|neg|new|nonzero|oct|or|pos|pow|radd|rand|rdiv|rdivmod|repr|rfloordiv|rlshift|rmod|rmul|ror|rpow|rrshift|rshift|rsub|rtruediv|rxor|set|setattr|setitem|setslice|str|sub|truediv|unicode|xor)__)\\b' |
936 | 936 | 'name': 'support.function.magic.python.renpy' |
937 | 937 | 'magic_variable_names': |
938 | 938 | 'comment': 'magic variables which a class/module may have.' |
|
949 | 949 | 'string_quoted_double': |
950 | 950 | 'patterns': [ |
951 | 951 | { |
952 | | - 'begin': '([uU]r)(""")' |
| 952 | + 'begin': '([fuUb]r)(""")' |
953 | 953 | 'beginCaptures': |
954 | 954 | '1': |
955 | 955 | 'name': 'storage.type.string.python.renpy' |
|
980 | 980 | ] |
981 | 981 | } |
982 | 982 | { |
983 | | - 'begin': '([uU]R)(""")' |
| 983 | + 'begin': '([fuUb]R)(""")' |
984 | 984 | 'beginCaptures': |
985 | 985 | '1': |
986 | 986 | 'name': 'storage.type.string.python.renpy' |
|
1061 | 1061 | ] |
1062 | 1062 | } |
1063 | 1063 | { |
1064 | | - 'begin': '([uU])(""")' |
| 1064 | + 'begin': '([fuUb])(""")' |
1065 | 1065 | 'beginCaptures': |
1066 | 1066 | '1': |
1067 | 1067 | 'name': 'storage.type.string.python.renpy' |
|
1105 | 1105 | '4': |
1106 | 1106 | 'name': 'punctuation.definition.string.end.python.renpy' |
1107 | 1107 | 'comment': 'double-quoted raw string' |
1108 | | - 'match': '([uU]r)(")((?:[^"\\\\]|\\\\.)*)(")' |
| 1108 | + 'match': '([fuUb]r)(")((?:[^"\\\\]|\\\\.)*)(")' |
1109 | 1109 | 'name': 'string.quoted.double.single-line.unicode-raw-regex.python.renpy' |
1110 | 1110 | } |
1111 | 1111 | { |
1112 | | - 'begin': '([uU]R)(")' |
| 1112 | + 'begin': '([fuUb]R)(")' |
1113 | 1113 | 'beginCaptures': |
1114 | 1114 | '1': |
1115 | 1115 | 'name': 'storage.type.string.python.renpy' |
|
1185 | 1185 | ] |
1186 | 1186 | } |
1187 | 1187 | { |
1188 | | - 'begin': '([uU])(")' |
| 1188 | + 'begin': '([fuUb])(")' |
1189 | 1189 | 'beginCaptures': |
1190 | 1190 | '1': |
1191 | 1191 | 'name': 'storage.type.string.python.renpy' |
|
1277 | 1277 | 'name': 'string.quoted.single.single-line.python.renpy' |
1278 | 1278 | } |
1279 | 1279 | { |
1280 | | - 'begin': '([uU]r)(\'\'\')' |
| 1280 | + 'begin': '([fuUb]r)(\'\'\')' |
1281 | 1281 | 'beginCaptures': |
1282 | 1282 | '1': |
1283 | 1283 | 'name': 'storage.type.string.python.renpy' |
|
1308 | 1308 | ] |
1309 | 1309 | } |
1310 | 1310 | { |
1311 | | - 'begin': '([uU]R)(\'\'\')' |
| 1311 | + 'begin': '([fuUb]R)(\'\'\')' |
1312 | 1312 | 'beginCaptures': |
1313 | 1313 | '1': |
1314 | 1314 | 'name': 'storage.type.string.python.renpy' |
|
1389 | 1389 | ] |
1390 | 1390 | } |
1391 | 1391 | { |
1392 | | - 'begin': '([uU])(\'\'\')' |
| 1392 | + 'begin': '([fuUb])(\'\'\')' |
1393 | 1393 | 'beginCaptures': |
1394 | 1394 | '1': |
1395 | 1395 | 'name': 'storage.type.string.python.renpy' |
|
1433 | 1433 | '4': |
1434 | 1434 | 'name': 'punctuation.definition.string.end.python.renpy' |
1435 | 1435 | 'comment': 'single quoted raw string' |
1436 | | - 'match': '([uU]r)(\')((?:[^\'\\\\]|\\\\.)*)(\')' |
| 1436 | + 'match': '([fuUb]r)(\')((?:[^\'\\\\]|\\\\.)*)(\')' |
1437 | 1437 | 'name': 'string.quoted.single.single-line.unicode-raw-regex.python.renpy' |
1438 | 1438 | } |
1439 | 1439 | { |
1440 | | - 'begin': '([uU]R)(\')' |
| 1440 | + 'begin': '([fuUb]R)(\')' |
1441 | 1441 | 'beginCaptures': |
1442 | 1442 | '1': |
1443 | 1443 | 'name': 'storage.type.string.python.renpy' |
|
1509 | 1509 | ] |
1510 | 1510 | } |
1511 | 1511 | { |
1512 | | - 'begin': '([uU])(\')' |
| 1512 | + 'begin': '([fuUb])(\')' |
1513 | 1513 | 'beginCaptures': |
1514 | 1514 | '1': |
1515 | 1515 | 'name': 'storage.type.string.python.renpy' |
|
0 commit comments