Home Download Buy Blog Forum Support

A language grammar question

A language grammar question

Postby P233 on Mon Mar 11, 2013 1:36 am

I used a trick way to match Sass functions in a new syntax highlighting package. But there is a little problem.

Code: Select all
<key>function</key>
<dict>
   <key>beginCaptures</key>
   <dict>
      <key>1</key>
      <dict>
         <key>name</key>
         <string>keyword.other.round-brackets.sass</string>
      </dict>
   </dict>
   <key>match</key>
   <string>(?&lt;=[\s|\(])[a-zA-Z0-9_-]+(\()</string>
   <key>name</key>
   <string>support.function.name.sass</string>
</dict>


Left side: TextMate, Right side: Sublime Text
Screen Shot 2013-03-10 at 17.54.50.png
Screen Shot 2013-03-10 at 17.54.50.png (124.31 KiB) Viewed 109 times


As you can see, the left round bracket can be changed colour in TextMate, but not in Sublime Text.

I surmise that beginCaptures / endCaptures cannot work with match rule (they can work with begin/end rule). Is that a bug? Or I did something wrong?

Thanks
P233
 
Posts: 2
Joined: Wed Dec 12, 2012 7:50 am

Return to Technical Support

Who is online

Users browsing this forum: cutcopypaste, Google [Bot] and 16 guests