[TxMt] Re: Syntax color for fortran storage modifier

riki riki80 at rediffmail.com
Mon Aug 25 01:00:19 UTC 2014


Thanks a lot Allan. Your solution works.

On Mon, 18 Aug 2014 20:53:41 +0530 "Allan Odgaard"  wrote
>On 15 Aug 2014, at 19:16, riki wrote:



> […] In the following code:

>

> […] I checked scope as you suggested. I got storage modifier scope 

> […] but not for allocatable.



The issue is not related to your custom theme but rather the Fortran 

grammar.



The Fortran - Modern grammar includes Fortran - Punchcard. This grammar 

has a rule for ‘meta.specification.fortran’. In this rule, a new 

context is started, and only Punchcard rules are included into that 

context, this is line 69 in the (Punchcard) grammar which is:



patterns = ( { include = '$self'; } );



If we change this to instead include the Modern grammar then it works:



patterns = ( { include = 'source.fortran.modern'; } );



There are other places where Punchcard includes Modern (it actually 

includes $self + Modern, but here $self is redundant since Modern 

includes Punchcard).



I do not know about this Modern vs Punchcard, it seems that if Punchcard 

is made to include Modern (as it already does) the two grammars should 

just be combined into a single one, which would make parsing more 

trapsnarent.



_______________________________________________

textmate mailing list

textmate at lists.macromates.com

http://lists.macromates.com/listinfo/textmate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20140825/67098f73/attachment.html>


More information about the textmate mailing list