Skip to content

Commit

Permalink
1.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
koroshiya committed Sep 30, 2015
1 parent 48d89ee commit e99cbe2
Show file tree
Hide file tree
Showing 4 changed files with 193 additions and 47 deletions.
72 changes: 56 additions & 16 deletions RenpyLanguage.JSON-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{"include": "#ingame"},

{
"begin": "^(\\s)*python(\\s)*:(\\s)*$",
"begin": "^(\\s)*python((\\s)+(\\w)*)?:(\\s)*$",
"beginCaptures":{
"0":{"name":"keyword.control.flow.renpy"}
},
Expand All @@ -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"
}
Expand Down Expand Up @@ -124,7 +111,7 @@
},

{
"begin": "^(\\s)*python(\\s)*:(\\s)*$",
"begin": "^(\\s)*python((\\s)+(\\w)*)?:(\\s)*$",
"beginCaptures":{
"0":{"name":"keyword.control.flow.renpy"}
},
Expand All @@ -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"}
},
Expand All @@ -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"
Expand Down
151 changes: 121 additions & 30 deletions RenpyLanguage.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</dict>
<dict>
<key>begin</key>
<string>^(\s)*python:</string>
<string>^(\s)*python((\s)+(\w)*)?:(\s)*$</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
Expand Down Expand Up @@ -96,33 +96,6 @@
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>^(\s)*init(\s)+((\+|\-)\d+\s+)?python:</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.control.flow.renpy</string>
</dict>
</dict>
<key>end</key>
<string>^(?!(\1\s+|\s*$))</string>
<key>name</key>
<string>source.python.renpy.init</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#init</string>
</dict>
<dict>
<key>include</key>
<string>source.python</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>source.python</string>
Expand Down Expand Up @@ -269,7 +242,7 @@
</dict>
<dict>
<key>begin</key>
<string>^(\s)*python(\s)*:(\s)*$</string>
<string>^(\s)*python((\s)+(\w)*)?:(\s)*$</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
Expand All @@ -296,7 +269,7 @@
</dict>
<dict>
<key>begin</key>
<string>^(\s)*init(\s)+((\+|\-)\d+\s+)?python:</string>
<string>^(\s)*init(\s)+((\+|\-)\d+\s+)?python((\s)+(\w)*)?:(\s)*$</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
Expand All @@ -321,6 +294,124 @@
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>^(\s)*init(\s+(\+|\-)\d+)?((\s)+(\w)*)?\s*:(\s)*$</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.control.flow.renpy</string>
</dict>
</dict>
<key>end</key>
<string>^(?!(\1\s+|\s*$))</string>
<key>name</key>
<string>source.renpy</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>^(\s)*python((\s)+(\w)*)?:(\s)*$</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.control.flow.renpy</string>
</dict>
</dict>
<key>end</key>
<string>^(?!(\1\s+|\s*$))</string>
<key>name</key>
<string>source.python.renpy.init</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#python</string>
</dict>
<dict>
<key>include</key>
<string>#init</string>
</dict>
<dict>
<key>include</key>
<string>source.python</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>^(\s*)(\$)(.*)$
?</string>
<key>name</key>
<string>source.python.renpy.init</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#python</string>
</dict>
<dict>
<key>include</key>
<string>#init</string>
</dict>
<dict>
<key>include</key>
<string>source.python</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>^(\s)*(style)(\s)+(.*)((\s)+(is)(\s)+(.*))?(\s)*:</string>
<key>beginCaptures</key>
<dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.control.flow.renpy</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>variable.renpy</string>
</dict>
<key>7</key>
<dict>
<key>name</key>
<string>variable.parameter.renpy</string>
</dict>
<key>9</key>
<dict>
<key>name</key>
<string>variable.renpy</string>
</dict>
</dict>
<key>end</key>
<string>^(?!(\1\s+|\s*$))</string>
<key>name</key>
<string>source.renpy.atl</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#atl</string>
</dict>
<dict>
<key>include</key>
<string>source.python</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>source.python</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>source.python</string>
Expand Down
3 changes: 2 additions & 1 deletion messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
14 changes: 14 additions & 0 deletions messages/1.1.6.txt
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit e99cbe2

Please sign in to comment.