[TxMt] Fortran asterisk comments

Dougal dougal at gmail.com
Sun Jan 13 15:11:41 UTC 2008


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 at 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 at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate
>



More information about the textmate mailing list