-
Notifications
You must be signed in to change notification settings - Fork 14
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
Emitted HLSL contains many unneeded new lines #57
Comments
Wouldn't it be better to preserve the comments? That would give some landmarks to authors who can navigate their code by familiarity, or leave anchors to search for. Especially in case of wrong line reporting, because of potential miss in the line directives (not unheard-of). I don't remember why we chose to remove them, it's possible that the reason is as simple as they just get skipped by AntlR's lexer, and we never made the effort of recovering them. |
@siliconvoodoo There are two reasons I can think of for stripping comments.
It may be useful to have an option to preserve them however. |
Ok I have a fix. (commit b3518ad) In between (change to a line emission system rather than line feeds) After improvement with "line economy" (only reemit when out of sync) |
Submitted in #61 |
For example ^.
The new lines here corresponded to stripped comments, but instead of emitting new lines, we should just be adjusting the first argument of those
#line
directives.The text was updated successfully, but these errors were encountered: