Permalink
Browse files

Improve comment.line match.

  • Loading branch information...
1 parent af6fbe8 commit 03478d05e2516adebeea64b670b44390caab6831 @infininight infininight committed Nov 29, 2011
Showing with 150 additions and 36 deletions.
  1. +75 −18 Syntaxes/Active4D Config.tmLanguage
  2. +75 −18 Syntaxes/Active4D.tmLanguage
@@ -13,46 +13,103 @@
<key>patterns</key>
<array>
<dict>
- <key>captures</key>
+ <key>begin</key>
+ <string>(^[ \t]+)?(?=`)</string>
+ <key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
- <string>punctuation.definition.comment.active4d-ini</string>
+ <string>punctuation.whitespace.comment.leading.active4d-ini</string>
</dict>
</dict>
- <key>match</key>
- <string>(//).*$\n?</string>
- <key>name</key>
- <string>comment.line.double-slash.active4d-ini</string>
+ <key>end</key>
+ <string>(?!\G)</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>`</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.active4d-ini</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.backtick.active4d-ini</string>
+ </dict>
+ </array>
</dict>
<dict>
- <key>captures</key>
+ <key>begin</key>
+ <string>(^[ \t]+)?(?=//)</string>
+ <key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
- <string>punctuation.definition.comment.active4d-ini</string>
+ <string>punctuation.whitespace.comment.leading.active4d-ini</string>
</dict>
</dict>
- <key>match</key>
- <string>(`).*$\n?</string>
- <key>name</key>
- <string>comment.line.backtick.active4d-ini</string>
+ <key>end</key>
+ <string>(?!\G)</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>//</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.active4d-ini</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.double-slash.active4d-ini</string>
+ </dict>
+ </array>
</dict>
<dict>
- <key>captures</key>
+ <key>begin</key>
+ <string>(^[ \t]+)?(?=\\\\)</string>
+ <key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
- <string>punctuation.definition.comment.active4d-ini</string>
+ <string>punctuation.whitespace.comment.leading.active4d-ini</string>
</dict>
</dict>
- <key>match</key>
- <string>(\\\\).*$\n?</string>
- <key>name</key>
- <string>comment.line.double-backslash.continuation.active4d-ini</string>
+ <key>end</key>
+ <string>(?!\G)</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>\\\\</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.active4d-ini</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.double-backslash.continuation.active4d-ini</string>
+ </dict>
+ </array>
</dict>
<dict>
<key>begin</key>
@@ -11,46 +11,103 @@
<key>patterns</key>
<array>
<dict>
- <key>captures</key>
+ <key>begin</key>
+ <string>(^[ \t]+)?(?=`)</string>
+ <key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
- <string>punctuation.definition.comment.active4d</string>
+ <string>punctuation.whitespace.comment.leading.active4d</string>
</dict>
</dict>
- <key>match</key>
- <string>(?:(`).*(?=%&gt;)|(`).*$\n)</string>
- <key>name</key>
- <string>comment.line.backtick.active4d</string>
+ <key>end</key>
+ <string>(?!\G)</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>`</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.active4d</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n|(?=%&gt;)</string>
+ <key>name</key>
+ <string>comment.line.backtick.active4d</string>
+ </dict>
+ </array>
</dict>
<dict>
- <key>captures</key>
+ <key>begin</key>
+ <string>(^[ \t]+)?(?=//)</string>
+ <key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
- <string>punctuation.definition.comment.active4d</string>
+ <string>punctuation.whitespace.comment.leading.active4d</string>
</dict>
</dict>
- <key>match</key>
- <string>(?:(//).*(?=%&gt;)|(//).*$\n)</string>
- <key>name</key>
- <string>comment.line.double-slash.active4d</string>
+ <key>end</key>
+ <string>(?!\G)</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>//</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.active4d</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n|(?=%&gt;)</string>
+ <key>name</key>
+ <string>comment.line.double-slash.active4d</string>
+ </dict>
+ </array>
</dict>
<dict>
- <key>captures</key>
+ <key>begin</key>
+ <string>(^[ \t]+)?(?=\\\\)</string>
+ <key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
- <string>punctuation.definition.comment.active4d</string>
+ <string>punctuation.whitespace.comment.leading.active4d</string>
</dict>
</dict>
- <key>match</key>
- <string>(\\\\).*$\n?</string>
- <key>name</key>
- <string>comment.line.double-backslash.continuation.active4d</string>
+ <key>end</key>
+ <string>(?!\G)</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>\\\\</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.comment.active4d</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.double-backslash.continuation.active4d</string>
+ </dict>
+ </array>
</dict>
<dict>
<key>begin</key>

0 comments on commit 03478d0

Please sign in to comment.