[SVN] Revised names for class, function, and tag names/parameters

Allan Odgaard allan at macromates.com
Sun May 1 14:18:58 UTC 2005


Here's my suggestion to a hierarchical naming scheme of the various 
parts of a class, function, or tag “declaration”:
    entity.name
    entity.name.tag
    entity.name.class
    entity.name.function

    entity.parameter
    entity.parameter.attribute.tag
    entity.parameter.parent.class
    entity.parameter.variable.function

    entity.type.result.function
    entity.type.parameter.function

    keyword.entity.name-of-parameter.function

So by styling only entity.name and entity.parameter the following 3 
constructs (in misc. forms, depending on language) should be matched:
    class name : parameter
    function name (parameter)
    <name parameter="value">

It's probably stretching it a bit to call the parent class/super class 
for the parameter, but hopefully not stretching it too far ;)

entity.type is for C, Obj-C, Java, and other manifest typed languages. 
Although most of these would probably prefer normal styling of the 
types, obj-c being (maybe?) the exception.

I made the name-of-parameter be a keyword, since I think that's the 
category it fits best in.




More information about the textmate-dev mailing list