overriding existing and adding new tag kinds

2011-02-18
2013-05-29
  • Mario Ray M.
    Mario Ray M.
    2011-02-18

    I'd like to override and add new tag kinds for a built-in language, is this possible? I can add a whole new language, but modifying the built-in one doesn't work. Here's an example:
    -regex-pascal=/(\w+)\s*=\s*class/\1/c,Class/
    -regex-pascal=/(function|procedure)\s+(\w+\.\w+)/\2/m,Method/
    -regex-pascal=/function\s+(\w+)/\1/f,Function/
    -regex-pascal=/procedure\s+(\w+)/\1/p,Procedure/
    -regex-pascal=/^(interface|implementation)$/\1/s,Section/

    other than f and p, the other 3 (m,c,s) is unknown. But:

    -langdef=nimrod
    -langmap=nimrod:.nim
    -regex-nimrod=/(\w+)\*?\s*=\s*object/\1/c,Class/
    -regex-nimrod=/proc\s+(\w+)/\1/m,Procedure/
    -regex-nimrod=/proc\s+`(+)`/\1/o,Operator/

    works as expected.