Skip to content
Browse files

Slightly modified the way commas, semicolons and arrows are handled i…

…nside functions and clauses. Also, scoped records as entity.name.type.class.record.erlang.

git-svn-id: http://svn.textmate.org/trunk/Bundles/Erlang.tmbundle@4923 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent 879e74b commit 1fa61c8fb65dece1220cfab3d2eaee7e986f6b72 @mietek mietek committed Aug 24, 2006
Showing with 147 additions and 18 deletions.
  1. +1 −1 Preferences/Record Symbols.plist
  2. +146 −17 Syntaxes/Erlang.plist
View
2 Preferences/Record Symbols.plist
@@ -5,7 +5,7 @@
<key>name</key>
<string>Record Symbols</string>
<key>scope</key>
- <string>source.erlang entity.name.type.record.definition</string>
+ <string>source.erlang entity.name.type.class.record.definition</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
View
163 Syntaxes/Erlang.plist
@@ -112,6 +112,12 @@
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>:|,</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation.erlang</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#internal-type-specifiers</string>
</dict>
@@ -235,6 +241,12 @@
<string>#internal-parameter-sequence</string>
</dict>
<dict>
+ <key>match</key>
+ <string>\|\||\||:|;|,|\.|-&gt;</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation.erlang</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>
@@ -420,6 +432,10 @@
</dict>
<dict>
<key>include</key>
+ <string>#parens</string>
+ </dict>
+ <dict>
+ <key>include</key>
<string>#character</string>
</dict>
<dict>
@@ -436,15 +452,11 @@
</dict>
<dict>
<key>include</key>
- <string>#variable</string>
- </dict>
- <dict>
- <key>include</key>
- <string>#punctuation</string>
+ <string>#symbolic-operator</string>
</dict>
<dict>
<key>include</key>
- <string>#symbolic-operator</string>
+ <string>#variable</string>
</dict>
<dict>
<key>match</key>
@@ -484,6 +496,12 @@
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>-&gt;|,|;</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>
@@ -515,6 +533,12 @@
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>-&gt;|,|;</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>
@@ -546,6 +570,12 @@
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>-&gt;|,|;</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>
@@ -608,6 +638,12 @@
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>-&gt;|,|;</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>
@@ -639,6 +675,12 @@
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>-&gt;|,|;</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>
@@ -750,6 +792,12 @@
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>,</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>
@@ -796,6 +844,12 @@
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>,</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>
@@ -958,6 +1012,12 @@
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>,</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>
@@ -968,7 +1028,7 @@
<key>begin</key>
<string>(?=\()</string>
<key>end</key>
- <string>(?=-&gt;|;|\bend\b)</string>
+ <string>(?=-&gt;)</string>
<key>name</key>
<string>meta.fun.clause.head.erlang</string>
<key>patterns</key>
@@ -981,6 +1041,10 @@
<key>include</key>
<string>#internal-guard-sequence</string>
</dict>
+ <dict>
+ <key>include</key>
+ <string>#everything-else</string>
+ </dict>
</array>
</dict>
<key>internal-function-clause</key>
@@ -1018,6 +1082,10 @@
</dict>
</array>
</dict>
+ <dict>
+ <key>include</key>
+ <string>#everything-else</string>
+ </dict>
</array>
</dict>
<key>internal-function-clause-body</key>
@@ -1039,6 +1107,12 @@
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>,</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>
@@ -1057,7 +1131,7 @@
</dict>
</dict>
<key>end</key>
- <string>(?=-&gt;|[;\.])</string>
+ <string>(?=-&gt;)</string>
<key>name</key>
<string>meta.function.clause.head.erlang</string>
<key>patterns</key>
@@ -1070,6 +1144,10 @@
<key>include</key>
<string>#internal-guard-sequence</string>
</dict>
+ <dict>
+ <key>include</key>
+ <string>#everything-else</string>
+ </dict>
</array>
</dict>
<key>internal-function-list</key>
@@ -1145,10 +1223,16 @@
<key>contentName</key>
<string>meta.guard-sequence.erlang</string>
<key>end</key>
- <string>(?=-&gt;|\.)</string>
+ <string>(?=-&gt;)</string>
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>,|;</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>
@@ -1193,6 +1277,12 @@
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>,</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>
@@ -1211,7 +1301,7 @@
</dict>
</dict>
<key>end</key>
- <string>(?=-&gt;|[;\.])</string>
+ <string>(?=-&gt;)</string>
<key>name</key>
<string>meta.function.clause.head.initial.erlang</string>
<key>patterns</key>
@@ -1224,6 +1314,10 @@
<key>include</key>
<string>#internal-guard-sequence</string>
</dict>
+ <dict>
+ <key>include</key>
+ <string>#everything-else</string>
+ </dict>
</array>
</dict>
<key>internal-parameter-sequence</key>
@@ -1245,6 +1339,12 @@
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>,</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>
@@ -1404,6 +1504,12 @@
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>\||\|\||,</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation.erlang</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>
@@ -2119,12 +2225,29 @@
</dict>
</array>
</dict>
- <key>punctuation</key>
+ <key>parens</key>
<dict>
- <key>match</key>
- <string>\(|\)|\|\||\||:|;|,|-&gt;</string>
+ <key>begin</key>
+ <string>(\()</string>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.operator.punctuation.erlang</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>(\))</string>
<key>name</key>
- <string>keyword.operator.punctuation.erlang</string>
+ <string>meta.structure.parens.erlang</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#everything-else</string>
+ </dict>
+ </array>
</dict>
<key>record-directive</key>
<dict>
@@ -2150,7 +2273,7 @@
<key>4</key>
<dict>
<key>name</key>
- <string>entity.name.type.record.definition.erlang</string>
+ <string>entity.name.type.class.record.definition.erlang</string>
</dict>
<key>5</key>
<dict>
@@ -2210,7 +2333,7 @@
<key>2</key>
<dict>
<key>name</key>
- <string>entity.name.type.record.erlang</string>
+ <string>entity.name.type.class.record.erlang</string>
</dict>
</dict>
<key>end</key>
@@ -2249,7 +2372,7 @@
<key>2</key>
<dict>
<key>name</key>
- <string>entity.name.type.record.erlang</string>
+ <string>entity.name.type.class.record.erlang</string>
</dict>
<key>3</key>
<dict>
@@ -2352,6 +2475,12 @@
<key>patterns</key>
<array>
<dict>
+ <key>match</key>
+ <string>,</string>
+ <key>name</key>
+ <string>keyword.operator.punctuation.erlang</string>
+ </dict>
+ <dict>
<key>include</key>
<string>#everything-else</string>
</dict>

0 comments on commit 1fa61c8

Please sign in to comment.
Something went wrong with that request. Please try again.