[TxMt] Crazy idea: scope assertions in regular expressions

Andy Armstrong andy at hexten.net
Sat Nov 24 16:26:21 UTC 2007


On 24 Nov 2007, at 16:24, Andy Armstrong wrote:
> For that use it doesn't have to integrated into the regex engine -  
> it'd be enough to have a scope based condition that a folding  
> pattern could depend upon:
>
> 	foldingStartMarker = '(^=(?!cut)|/\*|(\{|\[|\()\s*$)';
>        foldingStartIfScope = '! 
> markup.directive.comment.block.documentation.perl';
> 	foldingStopMarker = '(^=cut|\*/|^\s*(\}|\]|\)))';


Unrelated: I wonder why the Perl language definition supports C style / 
* */ comments - which aren't legal in Perl?

-- 
Andy Armstrong, Hexten







More information about the textmate mailing list