Permalink
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...
mietek committed Aug 24, 2006
1 parent 879e74b commit 1fa61c8fb65dece1220cfab3d2eaee7e986f6b72
Showing with 147 additions and 18 deletions.
  1. +1 −1 Preferences/Record Symbols.plist
  2. +146 −17 Syntaxes/Erlang.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
@@ -111,6 +111,12 @@
<string>meta.structure.binary.erlang</string>
<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>
@@ -234,6 +240,12 @@
<key>include</key>
<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>
@@ -418,6 +430,10 @@
<key>include</key>
<string>#binary</string>
</dict>
+ <dict>
+ <key>include</key>
+ <string>#parens</string>
+ </dict>
<dict>
<key>include</key>
<string>#character</string>
@@ -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>
@@ -483,6 +495,12 @@
<string>meta.expression.if.erlang</string>
<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>
@@ -514,6 +532,12 @@
<string>meta.expression.case.erlang</string>
<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>
@@ -545,6 +569,12 @@
<string>meta.expression.receive.erlang</string>
<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>
@@ -607,6 +637,12 @@
<string>meta.expression.try.erlang</string>
<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>
@@ -638,6 +674,12 @@
<string>meta.expression.begin.erlang</string>
<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>
@@ -749,6 +791,12 @@
<string>meta.function-call.guard.erlang</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>
@@ -795,6 +843,12 @@
<string>meta.function-call.erlang</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>
@@ -957,6 +1011,12 @@
<string>(?=;|\bend\b)</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>
@@ -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>
@@ -1038,6 +1106,12 @@
<string>(?=[;\.])</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>
@@ -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,9 +1223,15 @@
<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>
@@ -1192,6 +1276,12 @@
<string>(?=[;\.])</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>
@@ -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>
@@ -1244,6 +1338,12 @@
<string>meta.parameter-sequence.erlang</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>
@@ -1403,6 +1503,12 @@
<string>meta.structure.list.erlang</string>
<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>
@@ -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>
@@ -2351,6 +2474,12 @@
<string>meta.structure.tuple.erlang</string>
<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>

0 comments on commit 1fa61c8

Please sign in to comment.