* Allan Odgaard throw-away-1@macromates.com [2006-11-23 13:49]:
In property lists we scope it constant.other.key[.plist] -- here format is to be considered a key in the key/value data structure.
Okay. I was going to use string.quoted because the key is turned into a string (e.g., {'this' => 'that'} and {this => 'that'} are identical structures) but it looks wrong to see them as strings. Perl can think of them as strings, but to us they're keys.
I added the related case of bareword subscripts. For example, in
{ format => 'html' }->{ format }
the first format is constant.other.key.perl, and the second is constant.other.bareword.perl. Maybe constant.other.subscript is better?
I used (?<={)\s*\w+\s*(?=}) for the match, so the spaces around the second format are in the same scope. Is that a problem?