[TxMt] Change SQL bundle to pick out the constant.numeric element from a storage.type

Timothy Bates timothy.c.bates at gmail.com
Tue Oct 24 19:31:04 UTC 2006


Currently SQL storage like "varchar(24)" is all defined as storage.type.sql

It would be nice if the numeric length was picked out as
constant.numeric.sql

So a suggestion for whomever maintains the sql bundle: can we change the
simple regexp for storage type to a capture type.

I think something like this?

 

{    name = 'meta.storage.type.sql';
            match =
'(?i:\b(bigint|bigserial|bit|bit\svarying\(\d+\)|boolean|box|bytea|character
\s(varying)?\(\d+\)|char\(\d+\)|var\schar\(\d+\)|char(\(\d+\))?|cidr|circle|
date|double\sprecision|float\(\d+\)|inet|int|integer|interval\(\d+\)|line|ls
eg|macaddr|money|number(\(\d+\))?|numeric(\(\d+,\d+\))?|oid|path|point|polyg
on|real|smallint|serial|sysdate|text|times(\(\d+\))(\swithoutstimeszone)?|ti
mestamp(s(\(\d+\))(\swithoutstimeszone)?)?|tinyint\(\d+\)|varchar\d?(\(\d+\)
)?)\s*)\b';

    captures = 
            {    1 = { name = 'storage.type.sql'; };
                2 = { name = 'constant.numeric.sql'; };
            };
        },





More information about the textmate mailing list