Merge pull request #3916 from techee/symtree_icons
[geany-mirror.git] / ctags / parsers / dosbatch.c
blob0792c6734e189404cb74a9b4c1aaba02892bc7cc
1 /*
2 * Copyright (c) 2009, David Fishburn
4 * This source code is released for free distribution under the terms of the
5 * GNU General Public License version 2 or (at your option) any later version.
7 * This module contains functions for generating tags for DOS Batch language files.
8 */
11 * INCLUDE FILES
13 #include "general.h" /* must always come first */
15 #include <string.h>
16 #include "parse.h"
17 #include "routines.h"
18 #include "selectors.h"
20 static tagRegexTable dosTagRegexTable [] = {
21 {"^:([A-Za-z_0-9]+)", "\\1",
22 "l,label,labels", NULL},
23 {"set[ \t]+([A-Za-z_0-9]+)[ \t]*=", "\\1",
24 "v,variable,variables", NULL},
28 * FUNCTION DEFINITIONS
31 extern parserDefinition* DosBatchParser (void)
33 static const char *const extensions [] = { "bat", "cmd", NULL };
34 parserDefinition* const def = parserNew ("DosBatch");
35 static selectLanguage selectors[] = { selectByRexxCommentAndDosbatchLabelPrefix,
36 NULL };
38 def->extensions = extensions;
39 def->tagRegexTable = dosTagRegexTable;
40 def->tagRegexCount = ARRAY_SIZE (dosTagRegexTable);
41 def->method = METHOD_NOT_CRAFTED|METHOD_REGEX;
42 def->selectLanguage = selectors;
43 return def;