Skip to content

Commit

Permalink
compiler: minor documentation improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Aug 1, 2024
1 parent e954f4e commit 2d7e7b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/julec/obj/cxx/ident.jule
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ impl identCoder {
| v.Ident == TokenKind.Self:
ret identCoder.Self
| v.RetOrder == -1:
// The single return variable is just this one.
// Return directly [resultName] because of generated with this identifier.
ret resultName
| v.RetOrder >= 0:
ret resultName + "." + resultArgName + conv::Itoa(v.RetOrder)
Expand Down
2 changes: 2 additions & 0 deletions src/julec/obj/cxx/scope.jule
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,8 @@ impl scopeCoder {
}
}
} else if len(f.Decl.Result.Idents) == 1 {
// Non-tuple signle return type with identifier.
// Use [resultName] as identifier.
self.oc.indent()
self.oc.write(self.oc.tc.kind(f.Result))
self.oc.write(" " + resultName)
Expand Down

0 comments on commit 2d7e7b9

Please sign in to comment.