feat:(c/cpp) Add new type: file (#31)

This commit is contained in:
danymat
2022-01-09 13:20:12 +01:00
parent 0fdfd7ee82
commit ff5f7de750
3 changed files with 27 additions and 11 deletions

View File

@@ -113,6 +113,7 @@ return {
"field_declaration",
"template_declaration",
},
file = { "translation_unit" },
},
data = {
@@ -123,6 +124,15 @@ return {
},
},
},
file = {
["translation_unit"] = {
["0"] = {
extract = function()
return {}
end,
},
},
},
},
locator = function(node_info, nodes_to_match)
@@ -151,13 +161,15 @@ return {
use_default_comment = false,
doxygen = {
{ nil, "/**", { no_results = true } },
{ nil, " * @brief $1", { no_results = true } },
{ nil, " */", { no_results = true } },
{ nil, "/**", { no_results = true, type = { "func", "file" } } },
{ nil, " * @file", { no_results = true, type = { "file" } } },
{ nil, " * @brief $1", { no_results = true, type = { "func", "file" } } },
{ nil, " */", { no_results = true, type = { "func", "file" } } },
{ nil, "", { no_results = true, type = { "file" } } },
{ nil, "/**" },
{ nil, " * @brief $1" },
{ nil, " *" },
{ nil, "/**", type = { "func" } },
{ nil, " * @brief $1", type = { "func" } },
{ nil, " *", type = { "func" } },
{ "tparam", " * @tparam %s $1" },
{ "parameters", " * @param %s $1" },
{ "return_statement", " * @return $1" },