Hi everybody,
I've just upgraded to revision 513, and I've noticed that qq strings in Perl are no longer being recognised properly. Not just my beloved qq||, but also qq(), qq{} and for that matter qw().
The "Show scope" command from the lovely new Textmate bundle simply shows "source.perl" here, so I guess there's something wrong with the definitions in the language bundle for Perl, but I can't see anything obvious here.
Is this affecting anyone else?
Cheers, Andrew.
On 07/10/2005, at 4.55, Andrew Green wrote:
I've just upgraded to revision 513, and I've noticed that qq strings in Perl are no longer being recognised properly. Not just my beloved qq||, but also qq(), qq{} and for that matter qw().
I changed the system so that now the first rule to match something, is used. This is mainly for when one grammar includes another, and wants to override something in the included grammar, but with a shorter match (which was previously not possible).
The problem with Perl is that there's a support.function.perl which matches the qq (as a fucntion) near the top of the file, and the specific qq rule is near the bottom.
I've re-arranged it, and it'll work again in next build.
Speaking of perl, any specific reason why 'sub' is not defined as keyword or anything else?
I use the hack below, which I am sure is not quite appropriate.
Gerd
{ name = 'other.function'; match = '^\s*(sub)\s*([^(]*)(.*)'; captures = { 1 = { name = 'keyword.control.perl'; }; 2 = { name = 'entity.name.function'; }; 3 = { name = 'storage.type.method'; }; }; },
On 07/10/2005, at 5.28, Gerd Knops wrote:
Speaking of perl, any specific reason why 'sub' is not defined as keyword or anything else?
Nopeā¦
I use the hack below, which I am sure is not quite appropriate.
It's pretty close to what we use (for naming), I changed the existing function match to:
{ name = 'meta.function.perl'; match = '^\s*(sub)\s*([-a-zA-Z0-9_]+)\s*(?:((.*?)))?'; captures = { 1 = { name = 'storage.type.sub.perl'; }; 2 = { name = 'entity.name.function.perl'; }; 3 = { name = 'variable.parameter.perl'; }; }; },