Skip to content

Commit

Permalink
support let open MyModule syntax
Browse files Browse the repository at this point in the history
synatx highlighting breaks on such statements without this change
  • Loading branch information
percontation committed Oct 11, 2014
1 parent 5381c7f commit be9b450
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions Syntaxes/OCaml.plist
Expand Up @@ -46,6 +46,49 @@
<key>name</key>
<string>meta.module.binding</string>
</dict>
<dict>
<key>begin</key>
<string>\b(let)\s+(open)\s+([A-Z][a-zA-Z0-9'_]*)(?=(\.[A-Z][a-zA-Z0-9_]*)*)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.module-binding.ocaml</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.other.ocaml</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>support.other.module.ocaml</string>
</dict>
</dict>
<key>end</key>
<string>(\s|$)</string>
<key>name</key>
<string>meta.module.openbinding</string>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.separator.module-reference.ocaml</string>
</dict>
</dict>
<key>match</key>
<string>(\.)([A-Z][a-zA-Z0-9'_]*)</string>
<key>name</key>
<string>support.other.module.ocaml</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\b(let|and)\s+(?!\(\*)((rec\s+)([a-z_][a-zA-Z0-9_']*)\b|([a-z_][a-zA-Z0-9_']*|\([^)]+\))(?=\s)((?=\s*=\s*(?=fun(?:ction)\b))|(?!\s*=)))</string>
Expand Down

0 comments on commit be9b450

Please sign in to comment.