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

TypeSpec initializer comment support #967

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Scottmitch
Copy link

Motivation:
When generating code it maybe useful to insert
comments as anchors for post processing and further extension by other code generation tools. However
this is not easy to achieve with the existing API.

Modifications:

  • Add a TypeSpec.addInitializerComment method which is emitted only as comments above the addInitializerBlock.

@Scottmitch
Copy link
Author

This is a more constrained approach to #887. @JakeWharton in reference to #945 (comment), is this approach better suited to merge? Let me know if adjustment are required.

@Scottmitch Scottmitch force-pushed the comment_block branch 2 times, most recently from be3cb0e to 3724bdc Compare May 7, 2023 14:50
Motivation:
When generating code it maybe useful to insert
comments as anchors for post processing and further
extension by other code generation tools. However
this is not easy to achieve with the existing API.

Modifications:
- Add a `TypeSpec.addInitializerComment` method which
  is emitted only as comments above the `addInitializerBlock`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant