How to write one line comment without ';'
`// <debug>`
will compile to
// <debug>;
How can I remove the ';' ?
I want
// <debug>
I believe you can just do this:
# <debug>
There's no way to generate single-line comments in the output. That is not a feature we wish to have as part of the language.
edit: for those of you that want to go against the strong suggestion that you avoid backticks, just put a newline inside the backticks.
You mean this?
`// <debug>
`
This will generate
//aaa
;
... which is what you wanted.
→ #1473
Block comments don't recieve semicolons. Likewise, JS literals shouldn't get semicolon-ed as they should be providing their own.
$ coffee -bce '### ###'
// Generated by CoffeeScript 1.3.3
/*
*/
$ coffee -bce '`/**/`'
// Generated by CoffeeScript 1.3.3
/**/;
I want
// <debug>
and I think
// <debug>
;
is OK for me.
@iron9light Just curious, is it for documentation, similar to jsdoc?
No, it's for Sencha Touch (or ExtJS)
They will remove all things between //<debug> and //</debug> when compact js