cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.46k stars 161 forks source link

Candy generator has problems with new line characters in some positions #358

Open negora opened 7 years ago

negora commented 7 years ago

Hello:

I'm trying to convert a TS definition file into a JSweet Candy, using the Candy Generator. But I've found problems with some new line characters. Specifically, with those situated in these positions:

  1. Between a greater-than character, after defining a generic, and an opening bracket. Example:

    doThis<T> // New line character "\n"
      (arg1: number, arg2: string)
  2. After a comma, inside the definition of a generic. Example:

    interface MyInterface <A, B, // New line character "\n"
      C, D, E> {
    }

In addition to the \n character, I guess that it also happens with \r and \r\n. But I've not tested it.

Thank you!

renaudpawlak commented 7 years ago

That's lever/parser issue. Thank you very much for reporting. Until it get fixed, please remove faulting new lines.... thanks!

negora commented 7 years ago

OK. Thank you! ;)