matlab.c - ctags-5.8
Functions defined
Source code
#include "general.h"
#include <string.h>
#include "parse.h"
static void installMatLabRegex (const langType language)
{
addTagRegex (language, "^function[ \t]*\\[.*\\][ \t]*=[ \t]*([a-zA-Z0-9_]+)", "\\1", "f,function", NULL);
addTagRegex (language, "^function[ \t]*[a-zA-Z0-9_]+[ \t]*=[ \t]*([a-zA-Z0-9_]+)", "\\1", "f,function", NULL);
addTagRegex (language, "^function[ \t]*([a-zA-Z0-9_]+)[^=]*$", "\\1", "f,function", NULL);
}
extern parserDefinition* MatLabParser ()
{
static const char *const extensions [] = { "m", NULL };
parserDefinition* const def = parserNew ("MatLab");
def->extensions = extensions;
def->initialize = installMatLabRegex;
def->regex = TRUE;
return def;
}