From e99cbe247dc7856f95a05386635e403c4d8ab69c Mon Sep 17 00:00:00 2001 From: koroshiya Date: Wed, 30 Sep 2015 11:36:48 +1000 Subject: [PATCH] 1.1.6 --- RenpyLanguage.JSON-tmLanguage | 72 ++++++++++++---- RenpyLanguage.tmLanguage | 151 +++++++++++++++++++++++++++------- messages.json | 3 +- messages/1.1.6.txt | 14 ++++ 4 files changed, 193 insertions(+), 47 deletions(-) create mode 100644 messages/1.1.6.txt diff --git a/RenpyLanguage.JSON-tmLanguage b/RenpyLanguage.JSON-tmLanguage index 3bd182c..5c22f7b 100644 --- a/RenpyLanguage.JSON-tmLanguage +++ b/RenpyLanguage.JSON-tmLanguage @@ -22,7 +22,7 @@ {"include": "#ingame"}, { - "begin": "^(\\s)*python(\\s)*:(\\s)*$", + "begin": "^(\\s)*python((\\s)+(\\w)*)?:(\\s)*$", "beginCaptures":{ "0":{"name":"keyword.control.flow.renpy"} }, @@ -43,19 +43,6 @@ "name": "source.python.renpy" }, - { - "begin": "^(\\s)*init(\\s)+((\\+|\\-)\\d+\\s+)?python:", - "beginCaptures":{ - "0":{"name":"keyword.control.flow.renpy"} - }, - "patterns": [ - {"include": "#init"}, - {"include": "source.python"} - ], - "end": "^(?!(\\1\\s+|\\s*$))", - "name": "source.python.renpy.init" - }, - { "include":"source.python" } @@ -124,7 +111,7 @@ }, { - "begin": "^(\\s)*python(\\s)*:(\\s)*$", + "begin": "^(\\s)*python((\\s)+(\\w)*)?:(\\s)*$", "beginCaptures":{ "0":{"name":"keyword.control.flow.renpy"} }, @@ -137,7 +124,7 @@ }, { - "begin": "^(\\s)*init(\\s)+((\\+|\\-)\\d+\\s+)?python:", + "begin": "^(\\s)*init(\\s)+((\\+|\\-)\\d+\\s+)?python((\\s)+(\\w)*)?:(\\s)*$", "beginCaptures":{ "0":{"name":"keyword.control.flow.renpy"} }, @@ -149,6 +136,59 @@ "name": "source.python.renpy.init" }, + { + "begin": "^(\\s)*init(\\s+(\\+|\\-)\\d+)?((\\s)+(\\w)*)?\\s*:(\\s)*$", + "beginCaptures":{ + "0":{"name":"keyword.control.flow.renpy"} + }, + "patterns": [ + + { + "begin": "^(\\s)*python((\\s)+(\\w)*)?:(\\s)*$", + "beginCaptures":{ + "0":{"name":"keyword.control.flow.renpy"} + }, + "patterns": [ + {"include": "#python"}, + {"include": "#init"}, + {"include": "source.python"} + ], + "end": "^(?!(\\1\\s+|\\s*$))", + "name": "source.python.renpy.init" + }, + + { + "match":"^(\\s*)(\\$)(.*)$\n?", + "patterns": [ + {"include": "#python"}, + {"include": "#init"}, + {"include": "source.python"} + ], + "name": "source.python.renpy.init" + }, + + { + "begin": "^(\\s)*(style)(\\s)+(.*)((\\s)+(is)(\\s)+(.*))?(\\s)*:", + "beginCaptures":{ + "2":{"name":"keyword.control.flow.renpy"}, + "4":{"name":"variable.renpy"}, + "7":{"name":"variable.parameter.renpy"}, + "9":{"name":"variable.renpy"} + }, + "patterns": [ + {"include": "#atl"}, + {"include": "source.python"} + ], + "end": "^(?!(\\1\\s+|\\s*$))", + "name": "source.renpy.atl" + }, + + {"include": "source.python"} + ], + "end": "^(?!(\\1\\s+|\\s*$))", + "name": "source.renpy" + }, + { "include": "#default", "include": "source.python" diff --git a/RenpyLanguage.tmLanguage b/RenpyLanguage.tmLanguage index 16c50ad..3df0cb9 100644 --- a/RenpyLanguage.tmLanguage +++ b/RenpyLanguage.tmLanguage @@ -53,7 +53,7 @@ begin - ^(\s)*python: + ^(\s)*python((\s)+(\w)*)?:(\s)*$ beginCaptures 0 @@ -96,33 +96,6 @@ - - begin - ^(\s)*init(\s)+((\+|\-)\d+\s+)?python: - beginCaptures - - 0 - - name - keyword.control.flow.renpy - - - end - ^(?!(\1\s+|\s*$)) - name - source.python.renpy.init - patterns - - - include - #init - - - include - source.python - - - include source.python @@ -269,7 +242,7 @@ begin - ^(\s)*python(\s)*:(\s)*$ + ^(\s)*python((\s)+(\w)*)?:(\s)*$ beginCaptures 0 @@ -296,7 +269,7 @@ begin - ^(\s)*init(\s)+((\+|\-)\d+\s+)?python: + ^(\s)*init(\s)+((\+|\-)\d+\s+)?python((\s)+(\w)*)?:(\s)*$ beginCaptures 0 @@ -321,6 +294,124 @@ + + begin + ^(\s)*init(\s+(\+|\-)\d+)?((\s)+(\w)*)?\s*:(\s)*$ + beginCaptures + + 0 + + name + keyword.control.flow.renpy + + + end + ^(?!(\1\s+|\s*$)) + name + source.renpy + patterns + + + begin + ^(\s)*python((\s)+(\w)*)?:(\s)*$ + beginCaptures + + 0 + + name + keyword.control.flow.renpy + + + end + ^(?!(\1\s+|\s*$)) + name + source.python.renpy.init + patterns + + + include + #python + + + include + #init + + + include + source.python + + + + + match + ^(\s*)(\$)(.*)$ +? + name + source.python.renpy.init + patterns + + + include + #python + + + include + #init + + + include + source.python + + + + + begin + ^(\s)*(style)(\s)+(.*)((\s)+(is)(\s)+(.*))?(\s)*: + beginCaptures + + 2 + + name + keyword.control.flow.renpy + + 4 + + name + variable.renpy + + 7 + + name + variable.parameter.renpy + + 9 + + name + variable.renpy + + + end + ^(?!(\1\s+|\s*$)) + name + source.renpy.atl + patterns + + + include + #atl + + + include + source.python + + + + + include + source.python + + + include source.python diff --git a/messages.json b/messages.json index bddd5b6..41e7afe 100644 --- a/messages.json +++ b/messages.json @@ -12,5 +12,6 @@ "1.1.02": "messages/1.1.2.txt", "1.1.03": "messages/1.1.3.txt", "1.1.04": "messages/1.1.4.txt", - "1.1.05": "messages/1.1.5.txt" + "1.1.05": "messages/1.1.5.txt", + "1.1.06": "messages/1.1.6.txt" } diff --git a/messages/1.1.6.txt b/messages/1.1.6.txt new file mode 100644 index 0000000..1a87d13 --- /dev/null +++ b/messages/1.1.6.txt @@ -0,0 +1,14 @@ +Sublime Renpy v1.1.6 +====================== + +Bugfixes: + +Improvements: +-python and init python blocks now allow extra args between "python" and ":". + eg. "init -1 python hide:", as found in options.rpy + +Changes: +-init python blocks are no longer allowed within label contexts + +New: +-added support for plain init blocks (NOT init python blocks) \ No newline at end of file