Skip to content

Commit 1f172a5

Browse files
committed
geanygendoc: Add support for types "include" and "other"
They are both ignored by the default configuration, as include directives are not usually useful to document, and "other" is not normally emitted by the C language parser.
1 parent 909c45a commit 1f172a5

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

geanygendoc/data/filetypes/c.conf

+6
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ doctypes = {
4343
enumval.policy = FORWARD;
4444
# usually, locals are just not documented and get in the way
4545
local.policy = FORWARD;
46+
# usually nothing useful to document
47+
include.policy = PASS;
48+
other.policy = PASS;
4649

4750
function = {
4851
template = "/**\n * {symbol}:\n{for arg in argument_list} * @{arg}: {cursor}\n{end} * \n * {cursor}\n{if returns} * \n * Returns: \n{end}{if write_since}{if returns} * \n{end} * Since: \n{end} */\n";
@@ -77,6 +80,9 @@ doctypes = {
7780
doxygen = {
7881
# usually, locals are just not documented and get in the way
7982
local.policy = FORWARD;
83+
# usually nothing useful to document
84+
include.policy = PASS;
85+
other.policy = PASS;
8086

8187
function.template = "/**\n * {doxygen_prefix}brief {cursor}\n{for a in argument_list} * {doxygen_prefix}param {a} \n{end}{if returns} * {doxygen_prefix}returns \n{end}{if write_since} * {doxygen_prefix}since \n{end} * \n * \n */\n";
8288
macro.template = "/**\n * {doxygen_prefix}brief {cursor}\n{for a in argument_list} * {doxygen_prefix}param {a} \n{end}{if returns} * {doxygen_prefix}returns \n{end}{if write_since} * {doxygen_prefix}since \n{end} * \n * \n */\n";

geanygendoc/docs/manual.rst

+4
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ Known types
346346
A field (of a class for example).
347347
``function``
348348
A function.
349+
``include``
350+
An include directive.
349351
``interface``
350352
An interface.
351353
``local``
@@ -356,6 +358,8 @@ Known types
356358
A method.
357359
``namespace``
358360
A namespace.
361+
``other``
362+
A non-specific type that highly depend on the language.
359363
``package``
360364
A package.
361365
``prototype``

geanygendoc/src/ggd-tag-utils.c

+2
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,14 @@ static const struct {
256256
{ tm_tag_field_t, "field" },
257257
{ tm_tag_function_t, "function" },
258258
{ tm_tag_interface_t, "interface" },
259+
{ tm_tag_include_t, "include" },
259260
{ tm_tag_local_var_t, "local" },
260261
{ tm_tag_macro_t, "define" },
261262
{ tm_tag_macro_with_arg_t, "macro" },
262263
{ tm_tag_member_t, "member" },
263264
{ tm_tag_method_t, "method" },
264265
{ tm_tag_namespace_t, "namespace" },
266+
{ tm_tag_other_t, "other" },
265267
{ tm_tag_package_t, "package" },
266268
{ tm_tag_prototype_t, "prototype" },
267269
{ tm_tag_struct_t, "struct" },

0 commit comments

Comments
 (0)