| 1 |
|
| 2 |
settings = { |
| 3 |
# [[modifier ]type ]arg[square brackets, white spaces, ...](,|EOL) with support |
| 4 |
# of prototype as argument types (not recursive). |
| 5 |
# |
| 6 |
# Detailed expression: |
| 7 |
#function_args=(?: |
| 8 |
# matches () and (void) not to try to extract an argument for them |
| 9 |
# ^\([ \t]*(?:void)?[ \t]*\)$ |
| 10 |
# | |
| 11 |
# type or modifier (e.g. "char *") |
| 12 |
# (?:[a-zA-Z0-9_]+[ \t*]+ |
| 13 |
# prototype start (e.g. "(*", start of (*arg)) |
| 14 |
# (?:\([ \t*]*)?)* |
| 15 |
# the argument name itself (only capture) |
| 16 |
# ([a-zA-Z0-9_.]+) |
| 17 |
# prototype end (e.g. ")", end of (*arg)) |
| 18 |
# (?:[ \t]*\))? |
| 19 |
# possible white-spaces |
| 20 |
# [ \t]* |
| 21 |
# prototype arguments: we match anything between parentheses |
| 22 |
# (?:\([^)]*\))? |
| 23 |
# permissive match for post-arg (e.g. array size) |
| 24 |
# [^,]* |
| 25 |
# , or EOL |
| 26 |
# (?:,|$) |
| 27 |
# ) |
| 28 |
# note that \ are escaped, so to have a \ you need to put \\ |
| 29 |
match_function_arguments = "(?:^\\([ \t]*(?:void)?[ \t]*\\)$|(?:[a-zA-Z0-9_]+[ \t*]+(?:\\([ \t*]*)?)*([a-zA-Z0-9_.]+)(?:[ \t]*\\))?[ \t]*(?:\\([^)]*\\))?[^,]*(?:,|$))"; |
| 30 |
|
| 31 |
# global env |
| 32 |
global_environment = "doxygen_prefix = \"@\"; |
| 33 |
write_since = 0;"; |
| 34 |
} |
| 35 |
|
| 36 |
doctypes = { |
| 37 |
gtkdoc = { |
| 38 |
# Forward should be before the others to match first |
| 39 |
struct.struct.policy = FORWARD; |
| 40 |
struct.union.policy = FORWARD; |
| 41 |
struct.prototype.policy = FORWARD; |
| 42 |
member.policy = FORWARD; |
| 43 |
enumval.policy = FORWARD; |
| 44 |
# usually, locals are just not documented and get in the way |
| 45 |
local.policy = FORWARD; |
| 46 |
# usually nothing useful to document |
| 47 |
include.policy = PASS; |
| 48 |
other.policy = PASS; |
| 49 |
|
| 50 |
function = { |
| 51 |
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"; |
| 52 |
position = BEFORE; |
| 53 |
policy = KEEP; |
| 54 |
} |
| 55 |
macro = { |
| 56 |
template = "/**\n * {symbol}:\n{for arg in argument_list} * @{arg}: {cursor}\n{end} * \n * {cursor}\n{if returns} * \n * Returns: \n{end} */\n"; |
| 57 |
} |
| 58 |
struct = { |
| 59 |
template = "/**\n * {symbol}:\n{for member in children} * @{member}: {cursor}\n{end} * \n * {cursor}\n */\n"; |
| 60 |
position = BEFORE; |
| 61 |
policy = KEEP; |
| 62 |
children = MERGE; |
| 63 |
matches = member | prototype; |
| 64 |
} |
| 65 |
enum = { |
| 66 |
template = "/**\n * {symbol}:\n{for enumval in enumval_list} * @{enumval}: {cursor}\n{end} * \n * {cursor}\n */\n"; |
| 67 |
} |
| 68 |
union = { |
| 69 |
template = "/**\n * {symbol}:\n{for member in children} * @{member}: {cursor}\n{end} * \n * {cursor}\n */\n"; |
| 70 |
children = MERGE; |
| 71 |
} |
| 72 |
typedef = { |
| 73 |
template = "/**\n * {symbol}:\n * \n * {cursor}\n */\n"; |
| 74 |
} |
| 75 |
define = { |
| 76 |
template = "/**\n * {symbol}:\n * \n * {cursor}\n */\n"; |
| 77 |
} |
| 78 |
} |
| 79 |
|
| 80 |
doxygen = { |
| 81 |
# usually, locals are just not documented and get in the way |
| 82 |
local.policy = FORWARD; |
| 83 |
# usually nothing useful to document |
| 84 |
include.policy = PASS; |
| 85 |
other.policy = PASS; |
| 86 |
|
| 87 |
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"; |
| 88 |
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"; |
| 89 |
struct.member = { |
| 90 |
template = " /**< {cursor} */"; |
| 91 |
position = AFTER; |
| 92 |
} |
| 93 |
struct = { |
| 94 |
template = "/**\n * {doxygen_prefix}brief {cursor}\n * \n * \n */\n"; |
| 95 |
auto_doc_children = True; |
| 96 |
} |
| 97 |
union.member = { |
| 98 |
template = " /**< {cursor} */"; |
| 99 |
position = AFTER; |
| 100 |
} |
| 101 |
union = { |
| 102 |
template = "/**\n * {doxygen_prefix}brief {cursor}\n * \n * \n */\n"; |
| 103 |
auto_doc_children = True; |
| 104 |
} |
| 105 |
enum = { |
| 106 |
template = "/**\n * {doxygen_prefix}brief {cursor}\n * \n * \n */\n"; |
| 107 |
auto_doc_children = True; |
| 108 |
} |
| 109 |
enum.enumval = { |
| 110 |
template = " /**< {cursor} */"; |
| 111 |
position = AFTER; |
| 112 |
} |
| 113 |
typedef.template = "/**\n * {doxygen_prefix}brief {cursor}\n * \n * \n */\n"; |
| 114 |
define.template = "/**\n * {doxygen_prefix}brief {cursor}\n * \n * \n */\n"; |
| 115 |
} |
| 116 |
} |
| 117 |
|