xref: /Universal-ctags/parsers/perl.h (revision 08bf1b999d211d0a18de5b4e5f65ad0f8dbf1c51)
1 /*
2 *   Copyright (c) 2019, Masatake YAMATO
3 *
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.
6 */
7 #ifndef CTAGS_PARSER_PERL_H
8 #define CTAGS_PARSER_PERL_H
9 
10 /*
11 *   INCLUDE FILES
12 */
13 #include "general.h"  /* must always come first */
14 
15 #include "subparser.h"
16 
17 typedef struct sPerlSubparser perlSubparser;
18 
19 enum PerlModuleRoleType {
20 	ROLE_PERL_MODULE_USED,
21 	ROLE_PERL_MODULE_UNUSED,
22 };
23 
24 enum PerlKindType {
25 	KIND_PERL_NONE = -1,
26 	KIND_PERL_CONSTANT,
27 	KIND_PERL_FORMAT,
28 	KIND_PERL_LABEL,
29 	KIND_PERL_PACKAGE,
30 	KIND_PERL_SUBROUTINE,
31 	KIND_PERL_SUBROUTINE_DECLARATION,
32 	KIND_PERL_MODULE,
33 	KIND_PERL_HEREDOCMARKER,
34 };
35 
36 struct sPerlSubparser {
37 	subparser subparser;
38 	void (* findingQuotedWordNotify) (perlSubparser *,
39 									  int moduleIndex,
40 									  const char *qwd);
41 	void (* enteringPodNotify) (perlSubparser *);
42 	void (* leavingPodNotify)    (perlSubparser *);
43 };
44 
45 #endif	/* CTAGS_PARSER_PERL_H */
46