mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-23 15:56:59 +08:00
fix(doxygen): support @param[in/out] syntax without space
- Update PARAM_TAG_RE to correctly match @param[in], @param[out], @param[in,out] - Require space after qualifier to avoid matching @paramfoo - Add self-test cases for mixed @param[in] and @param[out] qualifiers Addresses review comments from Copilot and cubic-dev-ai
This commit is contained in:
@@ -53,7 +53,7 @@ FUNC_DECL_RE = re.compile(
|
||||
)
|
||||
|
||||
# Matches @param tags — supports both "@param name" and "@param[in] name" forms
|
||||
PARAM_TAG_RE = re.compile(r"@param\s*(?:\[(?:in|out|in,\s*out)\]\s*)?(\w+)")
|
||||
PARAM_TAG_RE = re.compile(r"@param(?:\s*\[(?:in|out|in,\s*out)\])?\s+(\w+)")
|
||||
|
||||
# Matches @return tag
|
||||
RETURN_TAG_RE = re.compile(r"@return\b")
|
||||
@@ -679,6 +679,13 @@ def self_test() -> int:
|
||||
"lv_obj_t * obj",
|
||||
"/** Do something\n * @param[in,out] obj pointer\n */",
|
||||
),
|
||||
(
|
||||
"mixed @param[in] and @param[out] qualifiers",
|
||||
"lv_test_qual_mixed",
|
||||
"void",
|
||||
"const lv_obj_t * src, lv_obj_t * dst",
|
||||
"/** Copy object\n * @param[in] src source pointer\n * @param[out] dst destination pointer\n */",
|
||||
),
|
||||
]
|
||||
for desc, func_name, ret_type, params, doxygen in good_cases:
|
||||
total += 1
|
||||
|
||||
Reference in New Issue
Block a user