aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2013-10-14 18:02:05 +0300
committerYakov Goldberg <yakov.g@samsung.com>2013-10-15 11:55:15 +0300
commitcad42c1123647a9e6a7f2260d1b940c81d4f4963 (patch)
tree14e3c998725c81adaa7f95c83251ed2a694dd2b3
parentadd parsing parameter's comments from doxygen (diff)
downloadeo_bindings-cad42c1123647a9e6a7f2260d1b940c81d4f4963.tar.gz
add fetching @brief and full desc from comment
-rw-r--r--eoparser/cparser.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/eoparser/cparser.py b/eoparser/cparser.py
index 135013d..e68070e 100644
--- a/eoparser/cparser.py
+++ b/eoparser/cparser.py
@@ -486,6 +486,16 @@ class Cparser(object):
l_tmp.append((direct, comment))
return l_tmp
+ def get_brief_desc_from_comment(self, com):
+ res = re.findall("@brief(.*)", com)
+ desc = res[0] if res else ""
+ return desc
+
+ def get_desc_from_comment(self, com):
+ m = re.sub("@.*\n", "", com)
+ m = m.replace("*", "").strip()
+ return m
+
#parsing header file
def h_file_data_get(self, filename):
f = open (filename, 'r')
@@ -516,6 +526,9 @@ class Cparser(object):
macro_name = res.group(1)
#looking for parameters direction and desc in comment
macro[macro_name] = self.get_param_dir_from_comment(comment_tmp)
+ #save comment for method
+ self.get_brief_desc_from_comment(comment_tmp)
+ self.get_desc_from_comment(comment_tmp)
#looking for class_get function to get class macro
current_class = ""