[TxMt] Re: formal definition of scope selector syntax?

Matt Neuburg matt at tidbits.com
Thu Jun 26 22:40:43 UTC 2008

On 6/26/08 12:26 PM, in article
D1A1823C-0A05-4D17-855F-82737CA19FDF at textmate.org, "Allan Odgaard"
<mailinglist at textmate.org> wrote:

> As for your concrete question, in the last example you quote, a, b, c,  
and d
> can all be scope selectors of the form given in the manual  
section 13.1 or
> 13.2 (13.1 being a subset of 13.2).

So scopes are matched literally (e.g.
> ³string²). These can form a  
³descendent selector² (13.2) e.g. ³source.ruby
> string², and for  
descendent selectors one can take the union (| or ,), the
> intersection  
(&), or the asymmetric difference (-).

That's a big help, thanks. My last question would then be how all of that
fits in with what it says in section 13.5 in the online help about ranking
selectors. I see how one can use those rules to rank two selectors whose
only operator internally is a space, e.g.

text source string


source string

But how on earth is one to make sense of the concept "the element deepest
down" when a selector is of the form

a - b | c & d, e - f | g & h

?? Even if I can make sense of that, what happens when we get to rule 3,
"remove the deepest element"? The deepest element of *what*?

Thx - m.

matt neuburg, phd = matt at tidbits.com, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!

More information about the textmate mailing list