I've noticed that in ActionScript 3.tmLanguage from Simon Gregory's AS3 bundle, firstLineMatch is defined to be \bAS3\b. I don't know ANY ActionScript class file that would match that pattern.
I believe this is the correct firstLineMatch for AS3: package\s?([\w.]*)\s?{
On May 23, 2009, at 1:30 AM, Brenton Simpson wrote:
I've noticed that in ActionScript 3.tmLanguage from Simon Gregory's AS3 bundle, firstLineMatch is defined to be \bAS3\b. I don't know ANY ActionScript class file that would match that pattern.
I believe this is the correct firstLineMatch for AS3: package\s?([\w.]*)\s?{
You need to add a ^ assertion to the beginning of that at least. And you need to make sure it can't get triggered in D, Doxygen, Groovy, Java, JavaScript, Processing, Scala. (The languages I quickly scanned to see have a package keyword that could get tripped up).
I believe this is the correct firstLineMatch for AS3: package\s?([\w.]*)\s?{
I don't believe there is a correct way of doing this. Or to avoid the languages Michael's identified:
[...]And you need to make sure it can't get triggered in D, Doxygen, Groovy, Java, JavaScript, Processing, Scala[...]
I used \bAS3\b because comments are as likely to be found on the first line as package declarations. So, for anyone who wanted to, adding 'AS3' would help TM identify ActionScript 3 over ActionScript files.
I've also taken the liberty of adding 'AS3' into the comment header for the same reason.
Cheers, Simon