On 29 Jun 2010, at 14:23, nuke wrote:We made the PHP grammar itself match the <?php … ?> construct, so with your grammar, those bits have been consumed by the including grammar, and the included PHP grammar will therefor be a no-op.
Apparently, it is an issue of PHP only. The following language definition
highlights Ruby and Serpent languages in my text, but not PHP insertions! What
the hell is wrong here?
{ scopeName = 'source.phpruby.serpent';
fileTypes = ( 'serpent', 'serpent.php', 'serpent.erb' );
patterns = (
{ begin = '<\?(php|=)?';
end = '\?>';
patterns = ( { include = 'source.php'; } );
},
The reason we made it this way was so that the PHP grammar can sort of work when used as the root grammar, since lots of users insist on using it that way, despite our efforts¹ to educate ;)
¹ http://wiki.macromates.com/Troubleshooting/PHPSyntaxHighlight
_______________________________________________