Not sure about the rest of it (I'm pretty unfamiliar with language grammars), but you'll definitely want to try escaping the asterisk; you'd probably be good with "^*" instead of "^[*]". (You might also want a \s* -- any amount of whitespace -- between the ^, which means start-of-line, and the *, to allow for whitespace before the asterisk, if Fortran allows it; I don't know, never used it.)
On Jan 11, 2008 2:34 PM, Stefan Duret sduret@gmail.com wrote:
Hi,
In the Fortran bundle, there doesn't appear to be any support for comment lines beginning with an asterisk, only for comments beginning with C or c. I have tried to add this in to the language but I am quite unfamiliar with how to do this properly and am I not very familiar with regular expressions. I tried adding the following in the bundle editor (using comment.line.c.fortran as an example) but it still does not recognize lines beginning in * as comments. Any help would be appreciated.
{ name = 'comment.line.asterisk.fortran'; begin = '^[*]'; end = '$\n?'; beginCaptures = { 0 = { name =
'punctuation.definition.comment.fortran'; }; }; patterns = ( { match = '\\s*\n'; } ); },
Thanks,
Stefan
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate