This is my first time playing with TextMate syntax; I've only been using it for about two weeks but so far I'm quite happy with it. But I found a problem in the Tcl bundle's syntax highlighting that causes embedded regexp and regsub commands to eat up the ending bracket which causes the embedded scope to continue beyond the end of the actual embedded command. For example:

set x "hello [regsub {abc} "abcdef" {fed}] world"

At the end of this line the scope would be: source.tcl > string.quoted.double.tcl > source.tcl.embedded where it should be just source.tcl; the attached patch fixes this by making the check for the ] at the end of the regsub and regexp command syntax a zero-width lookahead assertion.

A patch (created by svn diff) is attached. It's a very simple fix, and I've not noticed that it introduces any problems. One other thing to consider along similar lines is making source.tcl include #embedded; while this is more technically correct to the code structure it's not going to affect syntax highlighting any.

Best regards,

Taylor Venable
[email protected]
http://real.metasyntax.net:2357/

Attachment: tcl.diff
Description: Binary data

_______________________________________________
textmate-dev mailing list
[email protected]
http://lists.macromates.com/listinfo/textmate-dev

Reply via email to