[TxMt] Re: Fortran bundle type definition
Allan Odgaard
mailinglist at textmate.org
Wed Mar 6 09:42:11 UTC 2013
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
More information about the textmate
mailing list