diff options
author | Patrick McCarty <patrick.mccarty@linux.intel.com> | 2013-04-12 10:40:25 -0700 |
---|---|---|
committer | Patrick McCarty <patrick.mccarty@linux.intel.com> | 2013-04-12 10:40:25 -0700 |
commit | 793eb3eb123664017100dfb1a5407f0da639a339 (patch) | |
tree | 2a6511443d115418007151f95f3a0fa8f5300974 /dosbatch.c | |
download | ctags-793eb3eb123664017100dfb1a5407f0da639a339.tar.gz ctags-793eb3eb123664017100dfb1a5407f0da639a339.tar.bz2 ctags-793eb3eb123664017100dfb1a5407f0da639a339.zip |
Imported Upstream version 5.8upstream/5.8upstream
Diffstat (limited to 'dosbatch.c')
-rw-r--r-- | dosbatch.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/dosbatch.c b/dosbatch.c new file mode 100644 index 0000000..c165183 --- /dev/null +++ b/dosbatch.c @@ -0,0 +1,42 @@ +/*
+* $Id$
+*
+* Copyright (c) 2009, David Fishburn
+*
+* This source code is released for free distribution under the terms of the
+* GNU General Public License.
+*
+* This module contains functions for generating tags for DOS Batch language files.
+*/
+
+/*
+* INCLUDE FILES
+*/
+#include "general.h" /* must always come first */
+
+#include <string.h>
+#include "parse.h"
+
+/*
+* FUNCTION DEFINITIONS
+*/
+
+static void installDosBatchRegex (const langType language)
+{
+ addTagRegex (language,
+ "^:([A-Za-z_0-9]+)", "\\1", "l,label,labels", NULL);
+ addTagRegex (language,
+ "set[ \t]+([A-Za-z_0-9]+)[ \t]*=", "\\1", "v,variable,variables", NULL);
+}
+
+extern parserDefinition* DosBatchParser ()
+{
+ static const char *const extensions [] = { "bat", "cmd", NULL };
+ parserDefinition* const def = parserNew ("DosBatch");
+ def->extensions = extensions;
+ def->initialize = installDosBatchRegex;
+ def->regex = TRUE;
+ return def;
+}
+
+/* vi:set tabstop=4 shiftwidth=4: */
|