Permalink
Browse files

TextMate bundle: some syntax tweaks.

I was trying to figure out why some files stop highlighting after
a while, but couldn't work it out. There seems to be some kind of
recursion depth reached in the syntax highlighting, but I'm not
sure where.
  • Loading branch information...
1 parent 694611a commit 98e003b8fc571f4bfcb44816286e8072ec09ccbd @StefanKarpinski StefanKarpinski committed Mar 15, 2013
Showing with 3 additions and 18 deletions.
  1. +3 −18 contrib/Julia.tmbundle/Syntaxes/Julia.tmLanguage
@@ -7,13 +7,10 @@
<dict>
<key>fileTypes</key>
<array>
- <string>j</string>
<string>jl</string>
- <string>jul</string>
- <string>julia</string>
</array>
<key>firstLineMatch</key>
- <string>^#!/usr/bin/env\s+julia\s*$</string>
+ <string>^#!.*\bjulia\s*$</string>
<key>foldingStartMarker</key>
<string>^\s*(?:if|while|for|begin|function|macro|module|baremodule|type|immutable|let)\b(?!.*\bend\b).*$</string>
<key>foldingStopMarker</key>
@@ -164,7 +161,7 @@
<array>
<dict>
<key>match</key>
- <string>\b(?:function|type|immutable|macro|quote|abstract|bitstype|Base|Main|Core|typealias|module|baremodule|new)\b</string>
+ <string>\b(?:function|type|immutable|macro|quote|abstract|bitstype|typealias|module|baremodule|new)\b</string>
<key>name</key>
<string>keyword.other.julia</string>
</dict>
@@ -186,12 +183,6 @@
<key>name</key>
<string>variable.macro.julia</string>
</dict>
- <dict>
- <key>match</key>
- <string>\b(true|false|nothing|NA)\b</string>
- <key>name</key>
- <string>constant.language.julia</string>
- </dict>
</array>
</dict>
<key>number</key>
@@ -200,7 +191,7 @@
<array>
<dict>
<key>match</key>
- <string>((\b0(x|X)[0-9a-fA-F]*)|((\b[0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]*)?(im)?|\bInf(32)?\b|\bNaN(32)?\b|\be\b|\bpi\b)</string>
+ <string>((\b0(x|X)[0-9a-fA-F]*)|((\b[0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]*)?(im)?|\bInf(32)?\b|\bNaN(32)?\b|\btrue\b|\bfalse\b)</string>
<key>name</key>
<string>constant.numeric.julia</string>
</dict>
@@ -533,12 +524,6 @@
<string>meta.type.julia</string>
</dict>
<dict>
- <key>match</key>
- <string>\b(Int8|Int16|Int32|Int64|Int128|Uint8|Uint16|Uint32|Uint64|Uint128|Float32|Float64|Bool|Char|Int|Uint|Void|Any)\b</string>
- <key>name</key>
- <string>support.other.bit-types.julia</string>
- </dict>
- <dict>
<key>captures</key>
<dict>
<key>2</key>

2 comments on commit 98e003b

Member

quinnj replied Apr 16, 2013

I actually experience this as well in Sublime; I thought it was just a length issue (Sublime could only handle highlighting so much until it gave up...). It'd be nice to figure this out though.

Member

quinnj replied Apr 24, 2013

I think I figured out the highlighting length problem. I'll submit a pull request.

Please sign in to comment.