Tweaking regex for optimization and performance. disabling "punctuation.section.scope.round" seems to have helped.

git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@9130 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
This commit is contained in:
subtlegradient
2008-03-16 06:16:45 +00:00
parent 7a80c6d2ab
commit bb8deef61d
+13 -3
View File
@@ -22,7 +22,12 @@
</dict>
<dict>
<key>begin</key>
<string>(?x) (function) (?= (\s+ ([_$a-zA-Z][_$\w]*))? \s* \(.*?\))</string>
<string>(?x)
(function)
(?=
(?:\s+ (?:[_$a-zA-Z][_$\w]*))? \s* # The function name
\([^)]*\) # The properties that the function accepts
)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
@@ -164,7 +169,7 @@
<array>
<dict>
<key>begin</key>
<string>(\{)</string>
<string>(?&lt;!\))(\{)</string>
<key>captures</key>
<dict>
<key>1</key>
@@ -205,6 +210,8 @@
<string>punctuation.section.scope.round.js</string>
</dict>
</dict>
<key>disabled</key>
<integer>1</integer>
<key>end</key>
<string>(\))</string>
<key>name</key>
@@ -345,7 +352,10 @@
<key>function-params</key>
<dict>
<key>begin</key>
<string>(?x)(?&lt;=function) (?:\s+ ([_$a-zA-Z][_$\w]*))? \s* (\()</string>
<string>(?x)
(?&lt;=function) # Must come after the word "function"
(?:\s+ ([_$a-zA-Z][_$\w]*))? # Mtch the name if it exists
\s* (\()</string>
<key>beginCaptures</key>
<dict>
<key>1</key>