Open xigoi opened 3 years ago
Sorry, nimly does not support compiling to JS now.
nimly targets to use as a part of compilers, so it only targets C/C++ compiling. In what situation do you want to use nimly in JS? If it looks like a common situation, I will try to support JS.
Or, you are very welcome to make PRs for supporting JS!
I'm making a library that my team wants to use both in JavaScript and in Python. But I found out that I can use NPeg instead (which seems to work fine with JavaScript), so it's not a problem in the end. Thanks!
Minimal example:
When the code is compiled to C, it successfully outputs
0
. However, if compiled to JavaScript (with-d:release
), it outputs:Note that this happens both in Node and in the browser. The error happens on the first token passed to the parser, no matter what the parser looks like.