Permalink
Browse files

Improve comment.line match.

  • Loading branch information...
1 parent 2c3b876 commit 7213e1630c3f056662e6413b4eeca80c09c170a0 @infininight infininight committed Nov 13, 2011
Showing with 25 additions and 6 deletions.
  1. +25 −6 Syntaxes/ANTLR.plist
View
@@ -214,18 +214,37 @@
<string>comment.block.antlr</string>
</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.antlr</string>
+ <string>punctuation.whitespace.comment.leading.antlr</string>
</dict>
</dict>
- <key>match</key>
- <string>(//).*$\n?</string>
- <key>name</key>
- <string>comment.line.double-slash.antlr</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.antlr</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\n</string>
+ <key>name</key>
+ <string>comment.line.double-slash.antlr</string>
+ </dict>
+ </array>
</dict>
</array>
</dict>

0 comments on commit 7213e16

Please sign in to comment.