grammars/source.renpy.json in github-linguist-4.8.6 vs grammars/source.renpy.json in github-linguist-4.8.7
- old
+ new
@@ -115,62 +115,64 @@
"name": "keyword.control.statement.python",
"match": "\\b(function|nvl|block|choice|parallel|contains|on|voice|imagemap|hotspot|text|frame|textbutton|grid|add|key|use|bar|with|is|button|window|hbox|vbox|mousearea|imagebutton)\\b"
},
{
"comment": "renpy screen statement keywords",
- "name": "support.type.python",
+ "name": "support.type.screen.renpy",
"match": "\\b(kind|color|action|area|hovered|unhovered|clicked|modal|text_style|default|has|who|what|tag|value|theme)\\b"
},
{
"comment": "renpy transform keywords",
- "name": "support.type.python",
+ "name": "support.type.transform.renpy",
"match": "\\b(repeat|transform|fadein|fadeout|position|Position|easein|easeout|time|ui)\\b"
},
{
"comment": "other renpy keywords",
- "name": "support.type.python",
- "match": "\\b(Character|DynamicCharacter|music|sound|movie|pause|Transform|clear)\\b"
+ "name": "support.type.other.renpy",
+ "match": "\\b(MultiPersistent|Character|DynamicCharacter|music|sound|movie|pause|Transform|clear)\\b"
},
{
"comment": "python one-line renpy keyword",
- "name": "invalid.deprecated.operator.python",
+ "name": "invalid.deprecated.operator.renpy",
"match": "\\$"
},
{
- "comment": "python one-line renpy keyword",
- "name": "invalid.deprecated.operator.python",
- "match": "\\breturn\\b"
+ "comment": "python control statements",
+ "name": "keyword.control.statement.python",
+ "match": "\\b(return|pass|break|continue|yield)\\b"
},
{
- "comment": "python one-line renpy keyword",
- "name": "invalid.deprecated.operator.python",
- "match": "pass"
- },
- {
"comment": "python statements renpy keywords",
- "name": "support.type.python",
+ "name": "support.type.objects.renpy",
"match": "\\b(renpy|store|persistent|config)\\b"
},
{
"comment": "python statements renpy keywords",
- "name": "pythonblock.support.type.python",
+ "name": "support.type.python.renpy",
"match": "\\b(python)\\b"
},
{
"comment": "init statements renpy keywords",
- "name": "keyword.control.statement.python",
+ "name": "keyword.control.statement.init.renpy",
"match": "\\b(init)\\b"
},
{
"comment": "transition class renpy keywords",
- "name": "support.type.python",
+ "name": "support.type.transition.renpy",
"match": "\\b(Solid|AlphaDissolve|ComposeTransition|CropMove|Dissolve|Fade|ImageDissolve|MoveTransition|MultipleTransition|Pause|Pixellate|move_transitions)\\b"
},
{
+ "captures": {
+ "1": {
+ "name": "keyword.control.statement.with.renpy"
+ },
+ "2": {
+ "name": "support.type.transition.renpy"
+ }
+ },
"comment": "transitions renpy keywords",
- "name": "support.type.python",
- "match": "\\b(fade|dissolve|pixellate|move|moveinright|moveinleft|moveintop|moveinbottom|moveoutright|moveoutleft|moveouttop|moveoutbottom|ease|easeinright|easeinleft|easeintop|easeinbottom|easeoutright|easeoutleft|easeouttop|easeoutbottom|zoomin|zoomout|zoominout|vpunch|hpunch|blinds|squares|wipeleft|wiperight|wipeup|wipedown|slideleft|slideright|slideup|slidedown|slideawayleft|slideawayright|slideawayup|slideawaydown|irisin|irisout)\\b"
+ "match": "\\s+(with)\\s+\\b(fade|dissolve|pixellate|move|moveinright|moveinleft|moveintop|moveinbottom|moveoutright|moveoutleft|moveouttop|moveoutbottom|ease|easeinright|easeinleft|easeintop|easeinbottom|easeoutright|easeoutleft|easeouttop|easeoutbottom|zoomin|zoomout|zoominout|vpunch|hpunch|blinds|squares|wipeleft|wiperight|wipeup|wipedown|slideleft|slideright|slideup|slidedown|slideawayleft|slideawayright|slideawayup|slideawaydown|irisin|irisout)\\b"
},
{
"comment": "transform properties renpy keywords",
"name": "variable.parameter.function.python",
"match": "\\b(linear|top_margin|ymargin|xsize|ysize|yminimum|xminimum|ymaximum|xmaximum|transpose|insensitive|selected_idle|selected_hover|ground|idle|hover|focus_mask|hover_sound|activate_sound|style|spacing|text_align|size_group|layout|style_group|background|ypadding|xpadding|idle_color|hover_color|selected_idle_color|selected_hover_color|insensitive_color|xfill|xmargin|pos|xpos|ypos|anchor|xanchor|yanchor|align|xalign|yalign|xoffset|yoffset|xcenter|ycenter|rotate|rotate_pad|transform_anchor|zoom|xzoom|yzoom|nearest|alpha|additive|around|alignaround|angle|radius|crop|crop_relative|corner1|corner2|size|subpixel|delay|events)\\b"
@@ -184,55 +186,100 @@
"comment": "Audio/Movie statements renpy keywords",
"name": "keyword.control.statement.python",
"match": "\\b(play|queue|stop)\\b"
},
{
+ "captures": {
+ "2": {
+ "name": "support.type.music.renpy"
+ },
+ "3": {
+ "name": "entity.name.function.images.renpy"
+ }
+ },
"comment": "Audio functions renpy keywords",
- "name": "support.type.python",
- "match": "\\b(seen_audio|get_playing|is_playing|register_channel|set_pan|set_queue_empty_callback|set_volume|loop|noloop)\\b"
+ "match": "(\\s*\\.\\s*)(music|sound)\\s*\\.\\s*(play|seen_audio|get_duration|get_pause|get_playing|get_pos|is_playing|queue|register_channel|set_pan|set_pause|set_queue_empty_callback|set_volume|stop|loop|noloop)\\b"
},
{
+ "captures": {
+ "2": {
+ "name": "entity.name.function.images.renpy"
+ }
+ },
+ "comment": "Audio functions renpy keywords",
+ "match": "(\\s*\\.\\s*)(play|seen_audio)\\b"
+ },
+ {
"comment": "show statements renpy keywords",
- "name": "support.type.python",
+ "name": "support.type.show.renpy",
"match": "\\b(as|at|behind|onlayer|zorder|expression)\\b"
},
{
+ "captures": {
+ "2": {
+ "name": "entity.name.function.images.renpy"
+ }
+ },
"comment": "image functions renpy keywords",
- "name": "support.type.python",
- "match": "\\b(copy_images|get_image_bounds|get_placement|image_exists|seen_image|showing|start_predict|stop_predict)\\b"
+ "match": "(\\s*\\.\\s*)(can_show|copy_images|get_available_image_attributes|get_available_image_tags|get_image_bounds|get_placement|get_showing_tags|has_image|image_exists|seen_image|showing|start_predict|stop_predict)\\b"
},
{
"comment": "action renpy keywords",
- "name": "support.type.python",
+ "name": "support.type.action.renpy",
"match": "\\b(Hide|Jump|NullAction|Return|Show|ShowTransient)\\b"
},
{
"comment": "Data Action renpy keywords",
- "name": "support.type.python",
+ "name": "support.type.action.renpy",
"match": "\\b(SetDict|SetField|SetScreenVariable|SetVariable|ToggleDict|ToggleField|ToggleScreenVariable|ToggleVariable)\\b"
},
{
"comment": "Menu Action renpy keywords",
- "name": "support.type.python",
+ "name": "support.type.action.renpy",
"match": "\\b(MainMenu|Quit|ShowMenu|Start)\\b"
},
{
"comment": "File Action renpy keywords",
- "name": "support.type.python",
+ "name": "support.type.action.renpy",
"match": "\\b(FileAction|FileDelete|FileLoad|FilePage|FilePageNext|FilePagePrevious|FileSave|FileTakeScreenShot|QuickLoad|QuickSave)\\b"
},
{
"comment": "Audio Action renpy keywords",
- "name": "support.type.python",
+ "name": "support.type.action.renpy",
"match": "\\b(Play|Queue|SetMixer|Stop)\\b"
},
{
"comment": "Other Action renpy keywords",
- "name": "support.type.python",
+ "name": "support.type.other.renpy",
"match": "\\b(Preference|Function|Help|HideInterface|If|InvertSelected|MouseMove|Notify|OpenURL|RollForward|Rollback|ScreenShot|SelectedIf|Skip|With)\\b"
},
{
+ "comment": "Translation key \"new\"",
+ "name": "entity.name.function.translation.renpy",
+ "match": "(?:\\s+)\\b(new)\\b"
+ },
+ {
+ "comment": "Translation key \"old\"",
+ "name": "keyword.operator.logical.translation.renpy",
+ "match": "(?:\\s+)\\b(old)\\b"
+ },
+ {
+ "captures": {
+ "1": {
+ "name": "keyword.operator.logical.translation.renpy"
+ },
+ "2": {
+ "name": "entity.name.function.translation.renpy"
+ },
+ "3": {
+ "name": "support.type.translation.renpy"
+ }
+ },
+ "comment": "python statements renpy keywords",
+ "match": "^\\b(translate)\\b\\s\\b([a-zA-z0-9_]+)\\b\\s\\b(strings)\\b"
+ },
+ {
"comment": "keyword operators that evaluate to True or False",
"match": "\\b(and|in|is|not|or)\\b",
"name": "keyword.operator.logical.python"
},
{
@@ -347,11 +394,11 @@
},
{
"begin": "^\\s*((jump)|(call)|(screen)|(label)|(menu))\\s+(?=[a-zA-Z_][a-zA-Z_0-9]*\\s*)",
"beginCaptures": {
"1": {
- "name": "keyword.control.statement.python"
+ "name": "keyword.control.statement.renpy"
}
},
"end": "(\\n|\\()|#",
"endCaptures": {
"1": {
@@ -407,11 +454,11 @@
},
{
"begin": "((define)|(image)|(scene)|(show)|(hide))\\s+((\\s)|(?=[a-zA-Z_][a-zA-Z_0-9]*\\s*))",
"beginCaptures": {
"1": {
- "name": "keyword.control.statement.python"
+ "name": "keyword.control.statement.renpy"
}
},
"end": "(\\=)|(\\s)|(\\s*$\\n?|#.*$\\n?)",
"endCaptures": {
"1": {
@@ -817,11 +864,11 @@
]
},
{
"captures": {
"1": {
- "name": "keyword.control.statement.python"
+ "name": "keyword.control.statement.renpy"
}
},
"match": "\\b(menu)\\b"
},
{
@@ -1009,10 +1056,10 @@
"match": "(?x)\\b(\n\t\t\t\tbasestring|bool|buffer|bytearray|bytes|complex|dict|float|frozenset|int|\n\t\t\t\tlist|long|memoryview|object|range|set|slice|str|tuple|unicode|xrange\n\t\t\t)\\b",
"name": "support.type.python"
},
"constant_placeholder": {
"match": "(?i:(%(\\([a-z_]+\\))?#?0?\\-?[ ]?\\+?([0-9]*|\\*)(\\.([0-9]*|\\*))?([hL][a-z]|[a-z%]))|(\\{([#=\\-\\+!\\[\\].:\\w ]+)?\\})|(\\{\\/([!\\[\\].:\\w ]+)?\\})|(\\[([!\\[\\].:\\w ]+)?\\]))",
- "name": "constant.other.placeholder.python"
+ "name": "constant.character.escape.tags.renpy"
},
"docstrings": {
"patterns": [
{
"begin": "^\\s*(?=[uU]?[rR]?\"\"\")",
\ No newline at end of file