[TxMt] Re: Fortran bundle type definition

Jörg Stiller joerg.stiller at tu-dresden.de
Wed Mar 6 16:06:39 UTC 2013


Hi Allan,

many thanks for the hint. Finally I used

          (?i:,\s*(public|private)\s*::)? # 2: optional access attribute

where I just  added the double colon, which yields the desired behavior.

Cheers,
Joerg


Am 06.03.2013 um 10:42 schrieb Allan Odgaard <mailinglist at textmate.org>:

> On Mar 5, 2013, at 4:39 PM, Jörg Stiller <joerg.stiller at tu-dresden.de> wrote:
> 
>> […] the implementation of derived types does not support the access attributes […] inserting the "public" or "private" attributes as in
>> 
>> type, public ::  node
>>   integer ::  i
>> end type node
>> 
>> does not produce a consistent coloring (see also the attached screenshot1.png).
>> 
>> In an first attempt to resolve the problem, I changed the the corresponding entry […] to
>> 
>>  begin = '(?x:                 # extended mode
>>    ^\s*                        # begining of line and some space
>>    (?i:(type))                 # 1: word type
>>    (,\*(?i:(public|private)?)) # 2: optional access attribute
>>    \s+                         # some space
>>    ([a-zA-Z_][a-zA-Z0-9_]*)    # 3: type name
>>  )';
>> 
>> Can anybody give me a hint how to resolve the problem?
> 
> You need to change ‘\*’ into ‘\s*’ and your added rule has the comma as mandatory but keyword as optional. Also, it introduce two captures, by using (capturing) parentheses for both entire pattern and the keyword, I suggest:
> 
>    (?i:,\s*(public|private))? # 2: optional access attribute
> 
> 
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate



More information about the textmate mailing list