[SVN] RFC: use first (not longest) match

Jeroen van der Ham jeroen at je-ju.net
Sat Aug 6 19:01:45 UTC 2005


On 06-08-2005 10:41, Allan Odgaard wrote:
> Currently when finding a rule from the grammar, TextMate will use the 
> longest match, and in case of a tie, the first of these.
> 
> Since this is partly broken by not being able to know how long a  begin
> match is (and thus using the length of the begin pattern), I  was
> thinking about changing it, so that it always just uses first match.

I think that in the python bundle I depend on the behavior of use the
longest match. I think it would be possible to rearrange things so that
this continues to work.
It might lead to unexpected behavior with other bundles as well.

> Any objections?

If people open the language definition files using the (Apple) Property
List Editor, and save them, then AFAIK they are saved using alphabetical
ordering, which could then break stuff.


Jeroen.
-- 
            <http://www.je-ju.net/~jeroen/blog/>



More information about the textmate-dev mailing list