Is there a way to include comments in generated JS files?

You can do untyped __js__ ("// insert my comment"); but this appends a semicolon at the end of your comment.

Is there a way to inject a line of code in the generated JavaScript, without a semicolon?

I thought haxe.macro.Compiler.includeFile might do it (Test.hx · GitHub) but it also adds a semicolon.

Even the new js.Syntax.code js.Syntax - Haxe development API
adds one, but maybe it could have an argument to disable it?

@singmajesty, All

Has a fairly good way to do Comments in JavaScript, C++, C#, Java and Python (what I have tested).
Other Haxe output languages are checked for in sample code near the end but untested by me.

Thanks to the Haxe Forum members for the solution!