geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

kind.h
Go to the documentation of this file.
1/*
2* Copyright (c) 1998-2003, Darren Hiebert
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*/
8#ifndef CTAGS_MAIN_KIND_H
9#define CTAGS_MAIN_KIND_H
10
11/*
12* INCLUDE FILES
13*/
14
15#include "general.h"
16#include "types.h"
17#include "routines.h"
18
19/*
20* DATA DECLARATIONS
21*/
22
24 bool enabled;
25 char* name; /* role name */
26 char* description; /* displayed in --help output */
27
28 int id;
29};
30
31/*
32 * Predefined kinds
33 */
34#define KIND_REGEX_DEFAULT_LETTER 'r'
35#define KIND_REGEX_DEFAULT_NAME "regex"
36
37#define KIND_NULL_LETTER '\0'
38
39/* GHOST kind can be used for a value for
40 * initializing a variable holding a kind index,
41 * or filling a struct member holding a kind index.
42 *
43 * Typical case is filling a scope related struct
44 * member with GHOST to represent root name scope.
45 *
46 * input.c:
47 *
48 * int main (void) { return 0; }
49 *
50 * Consider that tagging "main" in above input.
51 * You may wonder what kind of value
52 * should be used to fill tag.extensionFields.scopeKindIndex.
53 * KIND_GHOST_INDEX can be used for the purpose.
54 */
55#define KIND_GHOST_INDEX -1
56#define KIND_GHOST_LETTER ' '
57#define KIND_GHOST_NAME "ghost"
58
59#define KIND_FILE_INDEX -2
60#define KIND_FILE_DEFAULT_LETTER 'F'
61#define KIND_FILE_DEFAULT_NAME "file"
62
63#define KIND_WILDCARD_INDEX -3
64#define KIND_WILDCARD_LETTER '*'
65
66typedef struct sScopeSeparator {
68 const char *separator;
70
72 bool enabled; /* are tags for kind enabled? */
73 char letter; /* kind letter */
74 char* name; /* kind name */
75 char* description; /* displayed in --help output */
77 int nRoles; /* The number of role elements. */
80 unsigned int separatorCount;
81
82 int id;
83
84 /* TODO:Following fields should be moved to kindObject. */
85 /* Usage of `syncWith' field is a bit tricky.
86
87 If `LANG_AUTO' is specified to `syncWith' field of a kind
88 (target kind), the main part of ctags updates the field with
89 the id of a parser (master parser) when initializing
90 parsers. It also updates `slave' and `master' fields.
91
92 If the value other than `LANG_AUTO' is specified,
93 the main part does nothing. */
97};
98
99#define ATTACH_ROLES(RS) .nRoles = ARRAY_SIZE(RS), .roles = RS
100#define ATTACH_SEPARATORS(S) .separators = S, .separatorCount = ARRAY_SIZE(S)
101
102/*
103* FUNCTION PROTOTYPES
104*/
105
106extern const char *scopeSeparatorFor (langType lang, int kindIndex, int parentKindIndex);
107
108#endif /* CTAGS_MAIN_KIND_H */
struct sScopeSeparator scopeSeparator
const char * scopeSeparatorFor(langType lang, int kindIndex, int parentKindIndex)
Definition: parse.c:531
char letter
Definition: kind.h:73
langType syncWith
Definition: kind.h:94
bool enabled
Definition: kind.h:72
kindDefinition * slave
Definition: kind.h:95
scopeSeparator * separators
Definition: kind.h:79
char * name
Definition: kind.h:74
kindDefinition * master
Definition: kind.h:96
roleDefinition * roles
Definition: kind.h:78
bool referenceOnly
Definition: kind.h:76
int nRoles
Definition: kind.h:77
unsigned int separatorCount
Definition: kind.h:80
char * description
Definition: kind.h:75
bool enabled
Definition: kind.h:24
char * description
Definition: kind.h:26
char * name
Definition: kind.h:25
const char * separator
Definition: kind.h:68
int parentKindIndex
Definition: kind.h:67
int langType
Definition: types.h:13