3 ms·
It is supposed to be Haskell-ish, but admittedly I haven't done much Haskell in a while. I just went roughly with what Steve suggested. But yeah, the missing co
by janpaul123 12y ago
It is supposed to be Haskell-ish, but admittedly I haven't done much Haskell in a while. I just went roughly with what Steve suggested. But yeah, the missing commas in lists is a pretty big mistake!
In any case, the parser can be found here, https://github.com/stevekrouse/hs.js/blob/812945939e14e3370f0a84159f3a67558b4bcc38/haskell.pegjs https://github.com/stevekrouse/hs.js/blob/812945939e14e3370f..., the transformations on the AST here, https://github.com/stevekrouse/hs.js/blob/812945939e14e3370f0a84159f3a67558b4bcc38/ast_transformations.js https://github.com/stevekrouse/hs.js/blob/812945939e14e3370f..., and the specs here, https://github.com/stevekrouse/hs.js/blob/812945939e14e3370f0a84159f3a67558b4bcc38/ast_transformations_spec.js https://github.com/stevekrouse/hs.js/blob/812945939e14e3370f....
- janpaul123 12y agoFixed the commas in https://github.com/stevekrouse/hs.js/commit/d087de3c6dee2827e08ee805d9720a965ee71bee https://github.com/stevekrouse/hs.js/commit/d087de3c6dee2827... :-)