Skip to content

Commit

Permalink
Add install-tmbundle script to contrib; improve TextMate bundle syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk committed Apr 17, 2012
1 parent 2eff864 commit be69a33
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 2 deletions.
104 changes: 102 additions & 2 deletions contrib/Julia.tmbundle/Syntaxes/Julia.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,25 @@
<key>firstLineMatch</key>
<string>^#!/usr/bin/env\s+julia\s*$</string>
<key>foldingStartMarker</key>
<string>^\s*(?:if|while|for|begin|function|struct|macro|module)\b(?!.*\bend\b).*$</string>
<string>^\s*(?:if|while|for|begin|function|struct|macro|module|type)\b(?!.*\bend\b).*$</string>
<key>foldingStopMarker</key>
<string>^\s*(?:end)\b.*$</string>
<key>name</key>
<string>Julia</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#function_decl</string>
</dict>
<dict>
<key>include</key>
<string>#function_call</string>
</dict>
<dict>
<key>include</key>
<string>#type_decl</string>
</dict>
<dict>
<key>include</key>
<string>#keyword</string>
Expand Down Expand Up @@ -78,13 +90,76 @@
</dict>
</array>
</dict>
<key>function_call</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>([a-zA-Z0-9_]+)\w*\(</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>support.function.julia</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>name</key>
<string>meta.function.call.julia</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>function_decl</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(function)\w*([a-zA-Z0-9_]+)\w*\(</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.julia</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.function.julia</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>name</key>
<string>meta.function.julia</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>$self</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>keyword</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\b(?:function|macro|quote|type|abstract|bitstype|typealias|struct|module)\b</string>
<string>\b(?:function|type|macro|quote|abstract|bitstype|typealias|struct|module)\b</string>
<key>name</key>
<string>keyword.other.julia</string>
</dict>
Expand Down Expand Up @@ -321,6 +396,31 @@
</dict>
</array>
</dict>
<key>type_decl</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.other.julia</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.type.julia</string>
</dict>
</dict>
<key>match</key>
<string>(type)\s+([a-zA-Z0-9_]+)</string>
<key>name</key>
<string>meta.type.julia</string>
</dict>
</array>
</dict>
</dict>
<key>scopeName</key>
<string>source.julia</string>
Expand Down
2 changes: 2 additions & 0 deletions contrib/install-tmbundle
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
cp -r Julia.tmbundle ~/Library/Application\ Support/TextMate/Bundles

0 comments on commit be69a33

Please sign in to comment.