Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

Commit

Permalink
fix highlighting of 'if'
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed Nov 13, 2011
1 parent f181332 commit 21cb155
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 33 deletions.
31 changes: 18 additions & 13 deletions Erlang.JSON-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -842,24 +842,29 @@
"patterns": [
{
"name": "meta.guard-expression.erlang",
"begin": "^",
"end": "(->)",
"endCaptures": {
"1": {"name": "punctuation.separator.clause-head-body.erlang"}
},
"begin": "(?<=if|;)",
"end": "(?=->)",
"patterns": [
{"include": "#everything-else"}
]
},
{
"match": "(;)|(,)",
"captures": {
"1": {"name": "punctuation.separator.clause-head-body.erlang"},
"2": {"name": "punctuation.separator.clauses.erlang"},
"3": {"name": "punctuation.separator.expressions.erlang"}
}
},
{"include": "#everything-else"}
"begin": "(->)",
"beginCaptures": {
"1": {"name": "punctuation.separator.clause-head-body.erlang"}
},
"end": "(;)|(?=end)",
"endCaptures": {
"1": {"name": "punctuation.separator.clauses.erlang"}
},
"patterns": [
{
"match": ",",
"name": "punctuation.separator.expressions.erlang"
},
{"include": "#everything-else"}
]
}
]
},
{
Expand Down
41 changes: 21 additions & 20 deletions Erlang.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -544,17 +544,9 @@
<array>
<dict>
<key>begin</key>
<string>^</string>
<string>(?&lt;=if|;)</string>
<key>end</key>
<string>(-&gt;)</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.separator.clause-head-body.erlang</string>
</dict>
</dict>
<string>(?=-&gt;)</string>
<key>name</key>
<string>meta.guard-expression.erlang</string>
<key>patterns</key>
Expand All @@ -566,30 +558,39 @@
</array>
</dict>
<dict>
<key>captures</key>
<key>begin</key>
<string>(-&gt;)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.separator.clause-head-body.erlang</string>
</dict>
<key>2</key>
</dict>
<key>end</key>
<string>(;)|(?=end)</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.separator.clauses.erlang</string>
</dict>
<key>3</key>
</dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>,</string>
<key>name</key>
<string>punctuation.separator.expressions.erlang</string>
</dict>
</dict>
<key>match</key>
<string>(;)|(,)</string>
</dict>
<dict>
<key>include</key>
<string>#everything-else</string>
<dict>
<key>include</key>
<string>#everything-else</string>
</dict>
</array>
</dict>
</array>
</dict>
Expand Down

0 comments on commit 21cb155

Please sign in to comment.