-
Notifications
You must be signed in to change notification settings - Fork 58
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
Carry comments through to target language (through AST) #65
Conversation
I recommend splitting up this proposal into two parts:
The reason is that 1. is several orders of magnitude easier to support. In most generators, it should come down to emitting an additional print at the right places (although determining these places might be a bit finicky). I think we are unlikely to accept the second part because the benefit/complexity ratio is dubious. |
Sounds good. |
I think Haxe should handle asterisks correctly in docblocks. |
What about markdown lists? I wouldn't want them to be broken by this (and yes, my codebase would break with this). I'm really not sure Haxe compiler should do anything with the content of the comments, and let macros/whatever parse them any way they want in userland. |
Do you have non-java-style docblocks, which have markdown list as their only content? |
- Clarified changes to docblock parsing - Generalised 'class' to 'type' - Added simpler Doc typedef
We will implement support for retaining type and field comments in the output, see linked Haxe issue. I'll close this PR because the actual proposal is a bit wider. It's unclear if in-code comments are feasible, but this can be discussed at a later point. |
A more comprehensive representation of code comments in Haxe AST would make for much more readable output and facilitate people using Haxe as a source-to-source tool.
Using a compiler flag, comments could be included in the generated code (e.g.
-Dcomments
) .This would replace the
doc
property that currently exists onBaseType
,ClassField
&Field
.Rendered doc