Permalink
Browse files

Minor enhancements to signature grammar: datatype decls and type abbrev

git-svn-id: http://svn.textmate.org/trunk/Bundles/Standard ML.tmbundle@7812 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
commonlisp committed Jul 26, 2007
1 parent 26f737d commit d000f3c3dac3befa5263424e59708262b43ad6b0
Showing with 70 additions and 5 deletions.
  1. +70 −5 Syntaxes/Standard ML.plist
View
@@ -253,25 +253,79 @@
<key>name</key>
<string>keyword.other.ml</string>
</dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.type.abbrev.ml</string>
+ </dict>
</dict>
<key>match</key>
- <string>\b(type)\b</string>
+ <string>\b(type)\s+([a-zA-Z][a-zA-Z0-9'_]*)</string>
<key>name</key>
<string>meta.spec.ml.type</string>
</dict>
<dict>
+ <key>begin</key>
+ <string>\b(datatype)\s+([a-zA-Z][a-zA-Z0-9'_]*)\s*(?==)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.ml</string>
</dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.type.datatype.ml</string>
+ </dict>
</dict>
- <key>match</key>
- <string>\b(datatype)\b</string>
+ <key>end</key>
+ <string>(?=val|type|eqtype|datatype|structure|include)</string>
<key>name</key>
<string>meta.spec.ml.datatype</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>variable.other.dcon.ml</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.other.ml</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(?x)
+ =\s*([a-zA-Z][a-zA-Z0-9'_]*)(\s+of)?</string>
+ <key>name</key>
+ <string>meta.datatype.rule.main.ml</string>
+ </dict>
+ <dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>variable.other.dcon.ml</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.other.ml</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>\|\s*([a-zA-Z][a-zA-Z0-9'_]*)\s+(of)?</string>
+ <key>name</key>
+ <string>meta.datatype.rule.other.ml</string>
+ </dict>
+ </array>
</dict>
<dict>
<key>captures</key>
@@ -288,6 +342,8 @@
<string>meta.spec.ml.val</string>
</dict>
<dict>
+ <key>begin</key>
+ <string>\b(structure)\s*(\w+)\s*:</string>
<key>captures</key>
<dict>
<key>1</key>
@@ -301,10 +357,19 @@
<string>entity.name.type.module.ml</string>
</dict>
</dict>
- <key>match</key>
- <string>\b(structure)\s*(\w+)\s*:</string>
+ <key>end</key>
+ <string>(?=val|type|eqtype|datatype|structure|include)</string>
<key>name</key>
<string>meta.spec.ml.structure</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>\b(sharing)\b</string>
+ <key>name</key>
+ <string>keyword.other.ml</string>
+ </dict>
+ </array>
</dict>
<dict>
<key>captures</key>

0 comments on commit d000f3c

Please sign in to comment.