forked from enlightenment/efl
eolian/generator: clean up comment gen
This commit is contained in:
parent
79083ed3af
commit
8dc8d6873d
|
@ -61,12 +61,8 @@ EAPI const Eo_Class *@#klasstype_get(void) EINA_CONST;\n\
|
|||
static const char
|
||||
tmpl_eo_funcdef_doxygen[] = "\
|
||||
/**\n\
|
||||
*\n\
|
||||
@#desc\n\
|
||||
*\n\
|
||||
@#list_desc_param\
|
||||
@#ret_desc\
|
||||
*\n\
|
||||
*/\n";
|
||||
|
||||
static const char
|
||||
|
@ -142,8 +138,6 @@ eo_fundef_generate(const Eolian_Class *class, const Eolian_Function *func, Eolia
|
|||
|
||||
Eina_Strbuf *str_par = eina_strbuf_new();
|
||||
Eina_Strbuf *str_pardesc = eina_strbuf_new();
|
||||
Eina_Strbuf *str_retdesc = eina_strbuf_new();
|
||||
Eina_Strbuf *str_typecheck = eina_strbuf_new();
|
||||
|
||||
itr = eolian_property_keys_get(func, ftype);
|
||||
EINA_ITERATOR_FOREACH(itr, data)
|
||||
|
@ -154,6 +148,8 @@ eo_fundef_generate(const Eolian_Class *class, const Eolian_Function *func, Eolia
|
|||
const char *ptype = eolian_type_c_type_get(ptypet);
|
||||
const char *pdesc = eolian_parameter_description_get(param);
|
||||
|
||||
if (!eina_strbuf_length_get(str_pardesc))
|
||||
eina_strbuf_append(str_pardesc, " *\n");
|
||||
eina_strbuf_append_printf(str_pardesc, tmpl_eo_pardesc, "in", pname, pdesc?pdesc:"No description supplied.");
|
||||
|
||||
if (eina_strbuf_length_get(str_par)) eina_strbuf_append(str_par, ", ");
|
||||
|
@ -185,6 +181,8 @@ eo_fundef_generate(const Eolian_Class *class, const Eolian_Function *func, Eolia
|
|||
|
||||
const char *dir_str = str_dir[(int)pdir];
|
||||
|
||||
if (!eina_strbuf_length_get(str_pardesc))
|
||||
eina_strbuf_append(str_pardesc, " *\n");
|
||||
eina_strbuf_append_printf(str_pardesc, tmpl_eo_pardesc, dir_str, pname, pdesc?pdesc:"No description supplied.");
|
||||
|
||||
if (eina_strbuf_length_get(str_par)) eina_strbuf_append(str_par, ", ");
|
||||
|
@ -208,16 +206,12 @@ eo_fundef_generate(const Eolian_Class *class, const Eolian_Function *func, Eolia
|
|||
if (!eina_strbuf_length_get(str_par)) eina_strbuf_append(str_par, "void");
|
||||
eina_strbuf_replace_all(str_func, "@#full_params", eina_strbuf_string_get(str_par));
|
||||
eina_strbuf_replace_all(str_func, "@#list_desc_param", eina_strbuf_string_get(str_pardesc));
|
||||
eina_strbuf_replace_all(str_func, "@#ret_desc", eina_strbuf_string_get(str_retdesc));
|
||||
eina_strbuf_replace_all(str_func, "@#list_typecheck", eina_strbuf_string_get(str_typecheck));
|
||||
|
||||
if (rettype) eina_stringshare_del(rettype);
|
||||
|
||||
free(tmpstr);
|
||||
eina_strbuf_free(str_par);
|
||||
eina_strbuf_free(str_retdesc);
|
||||
eina_strbuf_free(str_pardesc);
|
||||
eina_strbuf_free(str_typecheck);
|
||||
|
||||
eina_strbuf_append(functext, eina_strbuf_string_get(str_func));
|
||||
eina_strbuf_free(str_func);
|
||||
|
|
|
@ -15,9 +15,7 @@ static _eolian_class_vars class_env;
|
|||
static const char
|
||||
tmpl_eapi_funcdef[] = "\n\
|
||||
/**\n\
|
||||
*\n\
|
||||
@#desc\n\
|
||||
*\n\
|
||||
@#list_desc_param\
|
||||
*/\n\
|
||||
EAPI @#type_return%s(@#params)@#flags;\n\
|
||||
|
@ -124,6 +122,8 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
|
|||
if (eina_strbuf_length_get(fparam)) eina_strbuf_append(fparam, ", ");
|
||||
eina_strbuf_append_printf(fparam, "%s %s", ptype, pname);
|
||||
eina_stringshare_del(ptype);
|
||||
if (!eina_strbuf_length_get(descparam))
|
||||
eina_strbuf_append(descparam, " *\n");
|
||||
eina_strbuf_append_printf(descparam, " * @param[in] %s %s\n", pname, pdesc?pdesc:"No description supplied.");
|
||||
if (eolian_parameter_is_nonull((Eolian_Function_Parameter*)data))
|
||||
{
|
||||
|
@ -159,6 +159,8 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
|
|||
ptype, had_star?"":" ", add_star?"*":"", pname);
|
||||
eina_stringshare_del(ptype);
|
||||
const char *dir_str = str_dir[(int)pdir];
|
||||
if (!eina_strbuf_length_get(descparam))
|
||||
eina_strbuf_append(descparam, " *\n");
|
||||
eina_strbuf_append_printf(descparam, " * @param[%s] %s %s\n", dir_str, pname, pdesc?pdesc:"No description supplied.");
|
||||
if (eolian_parameter_is_nonull((Eolian_Function_Parameter*)data))
|
||||
{
|
||||
|
|
|
@ -22,55 +22,43 @@ EAPI const Eo_Class *class_simple_class_get(void) EINA_CONST;
|
|||
|
||||
#ifdef CLASS_SIMPLE_BETA
|
||||
/**
|
||||
*
|
||||
* Common desc for a
|
||||
* comment a.set
|
||||
*
|
||||
* @param[in] value Value description
|
||||
*
|
||||
*/
|
||||
EOAPI Eina_Bool evas_obj_simple_a_set(int value);
|
||||
#endif
|
||||
|
||||
#ifdef CLASS_SIMPLE_BETA
|
||||
/**
|
||||
*
|
||||
* Common desc for a
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
EOAPI int evas_obj_simple_a_get(void);
|
||||
#endif
|
||||
|
||||
/**
|
||||
*
|
||||
* No description supplied.
|
||||
*
|
||||
*
|
||||
*/
|
||||
EOAPI void evas_obj_simple_b_set(void);
|
||||
|
||||
#ifdef CLASS_SIMPLE_BETA
|
||||
/**
|
||||
*
|
||||
* comment foo
|
||||
*
|
||||
*
|
||||
* @param[in] a a
|
||||
* @param[inout] b No description supplied.
|
||||
* @param[out] c No description supplied.
|
||||
*
|
||||
*/
|
||||
EOAPI char * evas_obj_simple_foo(int a, char *b, double *c);
|
||||
#endif
|
||||
|
||||
/**
|
||||
*
|
||||
* No description supplied.
|
||||
*
|
||||
* @param[in] x No description supplied.
|
||||
*
|
||||
*/
|
||||
EOAPI int evas_obj_simple_bar(int x);
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ typedef Eo Class_Simple;
|
|||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* Common desc for a
|
||||
* comment a.set
|
||||
*
|
||||
|
@ -27,22 +26,17 @@ typedef Eo Class_Simple;
|
|||
EAPI Eina_Bool evas_object_simple_a_set(Class_Simple *obj, int value);
|
||||
|
||||
/**
|
||||
*
|
||||
* Common desc for a
|
||||
*
|
||||
*
|
||||
*/
|
||||
EAPI int evas_object_simple_a_get(const Class_Simple *obj);
|
||||
|
||||
/**
|
||||
*
|
||||
* No description supplied.
|
||||
*
|
||||
*/
|
||||
EAPI void evas_object_simple_b_set(Class_Simple *obj);
|
||||
|
||||
/**
|
||||
*
|
||||
* comment foo
|
||||
*
|
||||
*
|
||||
|
@ -53,7 +47,6 @@ EAPI void evas_object_simple_b_set(Class_Simple *obj);
|
|||
EAPI char *evas_object_simple_foo(Class_Simple *obj, int a, char *b, double *c);
|
||||
|
||||
/**
|
||||
*
|
||||
* No description supplied.
|
||||
*
|
||||
* @param[in] x No description supplied.
|
||||
|
|
|
@ -31,11 +31,9 @@ typedef struct _Opaque Opaque;
|
|||
EAPI const Eo_Class *struct_class_get(void) EINA_CONST;
|
||||
|
||||
/**
|
||||
*
|
||||
* No description supplied.
|
||||
*
|
||||
* @param[in] idx No description supplied.
|
||||
*
|
||||
*/
|
||||
EOAPI char * struct_foo(int idx);
|
||||
|
||||
|
|
|
@ -38,11 +38,9 @@ typedef enum
|
|||
EAPI const Eo_Class *typedef_class_get(void) EINA_CONST;
|
||||
|
||||
/**
|
||||
*
|
||||
* No description supplied.
|
||||
*
|
||||
* @param[in] idx No description supplied.
|
||||
*
|
||||
*/
|
||||
EOAPI char * typedef_foo(int idx);
|
||||
|
||||
|
|
Loading…
Reference in New Issue