castl icon indicating copy to clipboard operation
castl copied to clipboard

Transpilation error on valid JS code with identifiers similar to reserved words.

Open Renegatto opened this issue 1 year ago • 0 comments

Valid JS code

export {
    map,
    void
} from "../Data.Functor/index.js";

causes transpilation error:

Control.Apply
/home/renegatto/castl/bin/castl.js:170
        throw new SyntaxError("Couldn't transpile JS code: " + e);
        ^

SyntaxError: Couldn't transpile JS code: SyntaxError: ./output/Control.Apply/index.js: void is a reserved word (127:4)

The same happens with many of the reserved words. For example: delete,new,while.

Renegatto avatar May 16 '23 15:05 Renegatto