Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Patch from Kroc Camen to improve grammar with matching of:

'In' & 'Step' - "For Each ... In ... Step ..."
'Property' & 'End Property' for classes
'REM ' single line comment marker
Operators: =, >=, <=, <, >, <>, +, -, *, ^, & (concatenate) and 'Is' for "Is Nothing" comparison
'Class_Initialize' & 'Class_Terminate' de/constructor functions for classes

Also added support for folding of classes/functions.


git-svn-id: http://svn.textmate.org/trunk/Bundles/ASP.tmbundle@7757 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
commit 15771883e3adb56d5d530edbe32304d1753f9379 1 parent db39d4a
@sorbits sorbits authored
Showing with 22 additions and 4 deletions.
  1. +22 −4 Syntaxes/ASP.plist
View
26 Syntaxes/ASP.plist
@@ -8,6 +8,10 @@
<array>
<string>asa</string>
</array>
+ <key>foldingStartMarker</key>
+ <string>(?i)^\s*(Public|Private)?\s*(Class|Function|Sub|Property)\s*([a-zA-Z_]\w*)\s*(\(.*\)\s*)?$</string>
+ <key>foldingStopMarker</key>
+ <string>(?i)^\s*End (Class|Function|Sub|Property)\s*$</string>
<key>keyEquivalent</key>
<string>^~A</string>
<key>name</key>
@@ -63,20 +67,34 @@
<string>comment.line.apostrophe.asp</string>
</dict>
<dict>
+ <key>captures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.asp</string>
+ </dict>
+ </dict>
+ <key>match</key>
+ <string>(REM ).*$\n?</string>
+ <key>name</key>
+ <string>comment.line.rem.asp</string>
+ </dict>
+ <dict>
<key>match</key>
- <string>(?i:\b(If|Then|Else|ElseIf|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub)\b)</string>
+ <string>(?i:\b(If|Then|Else|ElseIf|End If|While|Wend|For|To|Each|In|Step|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub)\b)</string>
<key>name</key>
<string>keyword.control.asp</string>
</dict>
<dict>
<key>match</key>
- <string>(?i:\b(Mod|And|Not|Or|Xor)\b)</string>
+ <string>=|&gt;=|&lt;|&gt;|&lt;|&lt;&gt;|\+|-|\*|\^|&amp;|\b(?i:(Mod|And|Not|Or|Xor|Is))\b</string>
<key>name</key>
<string>keyword.operator.asp</string>
</dict>
<dict>
<key>match</key>
- <string>(?i:\b(Call|Class|Const|Dim|Redim|Function|Sub|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo)\b)</string>
+ <string>(?i:\b(Call|Class|Const|Dim|Redim|Function|Sub|Property|End Property|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo)\b)</string>
<key>name</key>
<string>storage.type.asp</string>
</dict>
@@ -165,7 +183,7 @@
</dict>
<dict>
<key>match</key>
- <string>(?i:\b(Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\b)</string>
+ <string>(?i:\b(Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart|Class_Initialize|Class_Terminate)\b)</string>
<key>name</key>
<string>support.function.event.asp</string>
</dict>
Please sign in to comment.
Something went wrong with that request. Please try again.