language-javascript
language-javascript copied to clipboard
Parser for JavaScript, in Haskell
This implements features for es 6 & 7. - [x] const and let - [x] arrow expressions - [ ] import - [ ] export - [ ] default arguments...
Just reporting that language-javascript seems to fail on macOS using the M1 architecture (Arm64), and I'm not sure how to make it pass: ``` bash-3.2$ locale LANG="en_AU.UTF-8" LC_COLLATE="en_AU.UTF-8" LC_CTYPE="en_AU.UTF-8" LC_MESSAGES="en_AU.UTF-8"...
I've been trying to minify Leaflet 1.5.1 with `hjsmin`'s `Text.Jasmine.minifym` function, but I get a Left value reading: ``` "HookToken {tokenSpan = TokenPn 87840 2829 23, tokenComment = [WhiteSpace (TokenPn...
I extracted a piece of code that generates a parsing error: ``` $('#form-2').addEventListener('submit', async event => { // some stuff }) ``` raise: ``` hjsmin: "IdentifierToken {tokenSpan = TokenPn 53...
Hi! Currently, there is a subtle difference in the way `language-javascript` deals with auto semicolons when comments are present. Let's have a look at this code sample: ```javascript function f1()...
The following code: ```javascript function foo() { return bar() } ``` is properly parsed to the following output: ```haskell Right (JSAstProgram [JSFunction 'foo' () (JSBlock [JSReturn ,JSMethodCall (JSIdentifier 'bar',JSArguments ())])])...
There was a bug reported when trying to use `language-javascript-0.7.1.0` in PureScript: https://github.com/purescript/purescript/pull/4199#issuecomment-962622105 It appears that `async` is completely treated as a keyword, and not allowed as an object key....
It appears `language-javascript` follows the PVP. Version `0.7.1.0` was recently released, which bumps from `0.7.0.0`. However, `0.7.1.0` includes https://github.com/erikd/language-javascript/pull/113, which adds new data constructors to an exported data type. I...
The magic CommonJS constants `__filename` and `__dirname` are not available in ES modules. They’re supposed to be replaced by [`import.meta.url`](https://nodejs.org/dist/latest-v16.x/docs/api/esm.html#esm_import_meta_url), but `language-javascript` does not support parsing this meta property.
when `import` webpack function is used ```js exports.lazyLoadedImport = function() { var x = import( './Example.Lazy.LazyLoaded.purs' ) console.log(x) return x } ``` it throws error - ``` Unable to parse...