Closed dadhi closed 3 years ago
Confirmed, this is a bug in the macro that processes using
statements. Often, comments attached to a statement will disappear if the applicable macro doesn't take steps to preserve them. (This has been a recurring problem because it is easier to write a macro that ignores comments than one that preserves them in its output.)
A workaround for this is to attach the comment to a #rawText("")
statement instead. #rawText("");
is a dummy node that causes an empty string to be written to the output file.
// This comment will be preserved
#rawText("");
Thankd for suggesting the workaround. I imagine that I can abuse #rawText("")
for other things too.
This should be fixed in v28.3 (2.8.3)
Hi @qwertie
I have an issue with comments erasure in output in LeMP v2.8.1 in here: https://github.com/dadhi/LempTest/blob/e59710f676c815a272e4ebe80cd9ca00ccd0c601/CompileTimeDI/CompileTimeDI.ecs#L4.
The result: https://github.com/dadhi/LempTest/blob/master/CompileTimeDI/CompileTimeDI.Generated.cs
I am running the LeMP with the following options: https://github.com/dadhi/LempTest/blob/e59710f676c815a272e4ebe80cd9ca00ccd0c601/CompileTimeDI/CompileTimeDI.csproj#L62