Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't print capabilities for type params when generating docs #2184

Merged
merged 1 commit into from Aug 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/libponyc/pass/docgen.c
Expand Up @@ -383,6 +383,7 @@ static void doc_type(docgen_t* docgen, docgen_opt_t* docgen_opt,
}

const char* cap_text = doc_get_cap(cap);

if(cap_text != NULL)
fprintf(docgen->type_file, " %s", cap_text);

Expand All @@ -409,10 +410,6 @@ static void doc_type(docgen_t* docgen, docgen_opt_t* docgen_opt,
AST_GET_CHILDREN(type, id, cap, ephemeral);
fprintf(docgen->type_file, "%s", ast_nice_name(id));

const char* cap_text = doc_get_cap(cap);
if(cap_text != NULL)
fprintf(docgen->type_file, " %s", cap_text);

if(ast_id(ephemeral) != TK_NONE)
fprintf(docgen->type_file, "%s", ast_get_print(ephemeral));

Expand Down Expand Up @@ -669,7 +666,7 @@ static void list_doc_params(docgen_t* docgen, docgen_opt_t* docgen_opt,
}

// Write a description of the given method to the current type file
static void doc_method(docgen_t* docgen, docgen_opt_t* docgen_opt,
static void doc_method(docgen_t* docgen, docgen_opt_t* docgen_opt,
ast_t* method)
{
pony_assert(docgen != NULL);
Expand Down Expand Up @@ -850,7 +847,7 @@ static void doc_entity(docgen_t* docgen, docgen_opt_t* docgen_opt, ast_t* ast)

case TK_BE:
doc_list_add_named(&pub_bes, p, 1, true, false);
doc_list_add_named(&priv_bes, p, 1,
doc_list_add_named(&priv_bes, p, 1,
false, docgen_opt->include_private);
break;

Expand Down Expand Up @@ -935,7 +932,7 @@ static void doc_package_home(docgen_t* docgen,


ponyint_pool_free_size(tqfn_len, tqfn);

docgen->public_types = printbuf_new();
docgen->private_types = printbuf_new();

Expand Down