eolian: inherit since information from struct to field 23/220823/1
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Mon, 23 Dec 2019 01:21:30 +0000 (10:21 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Mon, 23 Dec 2019 11:24:35 +0000 (20:24 +0900)
Summary:
If struct field doesn't explicitly sets since information, then since
is inherited from struct documentation if it is available.

Reviewers: jptiz, Jaehyun_Cho, woohyun, q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8359

Differential Revision: https://phab.enlightenment.org/D10948

Change-Id: I1dfd0ae6dad6f119d8873f6d2aff94398285f803

src/lib/eolian/eo_parser.c

index 96de7a7..65165db 100644 (file)
@@ -536,6 +536,8 @@ parse_struct(Eo_Lexer *ls, const char *name, Eina_Bool is_extern,
 qual_end:
         check_next(ls, ';');
         FILL_DOC(ls, fdef, doc);
+        if (def->doc && fdef->doc && def->doc->since && !fdef->doc->since)
+          fdef->doc->since = eina_stringshare_ref (def->doc->since);
      }
    check_match(ls, '}', '{', bline, bcolumn);
    FILL_BASE(def->base, ls, line, column, TYPEDECL);