Updates comment types and allows leadingComments to support multiple comment types, adds emitComments method in ConvenienceRenderer
Changes
Added types for different styles of comments (inline, description block, custom)
Updated leadingComments references to use new type
Updated all leadingComments logic in all relevant languages
Added emitComments method in ConvenienceRenderer to handle different comment styles
Updated emitCommentLines method to take object as param instead of list args
Added lineEnd param to emitCommentLines
renamed beforeLine to beforeComment and afterLine to afterComment
This change is backwards-compatible for all external/standard use cases as it preserves the existing string[] type for leadingCommentsbut it will break custom renderers that call emitCommentLines directly
Fixes #2332
Summary
Updates comment types and allows
leadingComments
to support multiple comment types, addsemitComments
method in ConvenienceRendererChanges
emitComments
method in ConvenienceRenderer to handle different comment stylesemitCommentLines
method to take object as param instead of list argslineEnd
param toemitCommentLines
beforeLine
tobeforeComment
andafterLine
toafterComment
This change is backwards-compatible for all external/standard use cases as it preserves the existing
string[]
type forleadingComments
but it will break custom renderers that callemitCommentLines
directly