doc: optimize to reduce duplicated docs

This commit is contained in:
lzhengning 2021-03-16 15:42:53 +08:00
parent 331964afe8
commit 051ba4e5f3
1 changed files with 4 additions and 4 deletions

View File

@ -642,11 +642,11 @@ def compile_src(src, h, basename):
for did, has_return in enumerate(arr_has_return):
df = dfs[did]
func_call = arr_func_call[did]
if df["doc"]:
if df["doc"] and not (did > 0 and df["doc"] == dfs[did - 1]["doc"]):
doc_all += "Document:\n"
doc_all += df["doc"]
doc_all += "\nDeclaration:\n"
doc_all += df["dec"]
doc_all += df["doc"]+'\n'
doc_all += "Declaration:\n"
doc_all += df["dec"]+'\n\n'
decs += " " + df["dec"]+'\n'
if has_return:
assert "-> int" not in func_head