ES6 Parser in Dlang
aberba
karabutaworld at gmail.com
Thu Feb 27 22:35:29 UTC 2020
On Thursday, 27 February 2020 at 22:22:59 UTC, Sebastiaan Koppe
wrote:
> On Thursday, 27 February 2020 at 14:06:19 UTC, James Lu wrote:
>> [...]
>
> I dunno. I wrote the es6-grammar library that uses pegged. Then
> I decided to hand write mine own.
>
> https://github.com/skoppe/jazr
>
> It is a pretty complete and fast JS minifier. It has lots of
> passes and minifies code pretty well:
>
> https://github.com/skoppe/jazr/blob/master/source/es6/minifier.d#L286
>
> In general it is about 30 times faster than uglify-js (and uses
> 3-4 times less memory). It parses JS code at about 60 Mb/s. The
> minifier was a bit slower at 20 Mb/s if I remember correctly.
>
> I fuzzed the lexer and parser, so there are little to no
> spurious crashes on weird input.
>
> Use it as you please, or just as an indication of the effort
> involved.
Nice!!
More information about the Digitalmars-d
mailing list