livescript-next icon indicating copy to clipboard operation
livescript-next copied to clipboard

Multi-line comments

Open danielo515 opened this issue 7 years ago • 0 comments

Hello,

Today I discovered that your library does not support multi line comments. Is this intentional ? Is it a mistake ? Will it be hard to implement ?

With multi line comments I mean this:

/**
 * @function push
 * @param  {Array} arr The array to use as base to push any element
 * @param  {Any} x Any kind of item that will be pushed into the array
 * @return {Array} The array with a new element at the end
 */
function push arr, x
    [...arr, x]

This will allow me to use JSDoc to document my source code, which is very convenient.

As a workaround I can use a string to include the comment:

"
/**
 * @function push
 * @param  {Array} arr The array to use as base to push any element
 * @param  {Any} x Any kind of item that will be pushed into the array
 * @return {Array} The array with a new element at the end
 */
"
function push arr, x
    [...arr, x]

Not pretty but works, and the impact on output is not huge. If you find any other way or do you know anything I could be doing wrong, I'll be glad to hear it.

Regards

danielo515 avatar Aug 05 '18 11:08 danielo515