4 * Copyright (c) 2003, Darren Hiebert
6 * This source code is released for free distribution under the terms of the
7 * GNU General Public License.
9 * This module contains functions for generating tags for JavaScript language
16 #include "general.h" /* must always come first */
20 * FUNCTION DEFINITIONS
23 static void installJavaScriptRegex (const langType language
)
25 addTagRegex (language
, "^[ \t]*function[ \t]*([A-Za-z0-9_]+)[ \t]*\\(",
26 "\\1", "f,function,functions", NULL
);
29 /* Create parser definition stucture */
30 extern parserDefinition
* JavaScriptParser (void)
32 static const char *const extensions
[] = { "js", NULL
};
33 parserDefinition
*const def
= parserNew ("JavaScript");
34 def
->extensions
= extensions
;
35 def
->initialize
= installJavaScriptRegex
;
40 /* vi:set tabstop=4 shiftwidth=4: */