Skip to content

Commit

Permalink
Preserve doc comments in converted sequences and dictionaries (#3082)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Nov 6, 2024
1 parent 2733f64 commit e56be02
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cpp/src/ice2slice/Gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ namespace

string slice2LinkFormatter(string identifier, string memberComponent)
{
// Replace links of the form `{@link Type#member}` with `{@link Type.member}`.
// Replace links of the form `{@link Type#member}` with `{@link Type::member}`.
string result = "{@link ";
if (memberComponent.empty())
{
Expand All @@ -278,7 +278,7 @@ namespace
}
else
{
result += identifier + "." + memberComponent;
result += identifier + "::" + memberComponent;
}
return result += "}";
}
Expand Down Expand Up @@ -571,6 +571,7 @@ Gen::TypesVisitor::visitSequence(const SequencePtr& p)
const string scope = p->scope();
Output& out = getOutput(p);

writeComment(p, out);
out << nl << "typealias " << p->name() << " = ";

for (const auto& metadata : p->getMetadata())
Expand Down Expand Up @@ -609,6 +610,7 @@ Gen::TypesVisitor::visitDictionary(const DictionaryPtr& p)
const string scope = p->scope();
Output& out = getOutput(p);

writeComment(p, out);
out << nl << "typealias " << p->name() << " = ";

for (const auto& metadata : p->getMetadata())
Expand Down

0 comments on commit e56be02

Please sign in to comment.