Skip to content

Commit

Permalink
feat: include function, param, and return descriptions in impl.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
G4Vi committed Sep 19, 2024
1 parent 8abab62 commit 6cb8191
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions template/impl.cpp.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
#include "pdk.gen.hpp"

<% for (const func of schema.exports) { %>
/**
* <%- formatCommentBlock(func.description) %>
<% if (func.input || func.output) { -%>
*
<% } -%>
<% if (func.input) { -%>
* @param input <%- formatCommentBlock(func.input.description) %>
<% } -%>
<% if (func.output) { -%>
* @return <%- formatCommentBlock(func.output.description) %>
<% } -%>
*/
<%- getExportReturnType(func) -%> impl::<%- func.name-%>(<%- getExportParamType(func) -%> <%- getParamName(func) -%>) {
<% if (featureFlags['stub-with-code-samples'] && codeSamples(func, 'c++').length > 0) { -%>
<%- codeSamples(func, 'c++')[0].source %>
Expand Down

0 comments on commit 6cb8191

Please sign in to comment.