W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2012

Re: WebIDL2.js

From: Glenn Adams <glenn@skynav.com>
Date: Wed, 31 Oct 2012 08:07:58 +0100
Message-ID: <CACQ=j+dF=RrMHh9zsxuFeb9u2S5_325idx33q-3Tn304L5-9Wg@mail.gmail.com>
To: Robin Berjon <robin@w3.org>
Cc: public-script-coord@w3.org
Could you comment more on the changes from V1 on the output format? If you
add the extensions I suggest at [1], I'd be glad to give V2 a try.


On Tue, Oct 30, 2012 at 6:25 PM, Robin Berjon <robin@w3.org> wrote:

> Hi all,
> just a quick note to tell you that I've written a completely new version
> of JS WebIDL parser. The previous version was a one-off hack that I wrote
> really quickly because I needed something, but that became used a fair bit
> more than I'd intended.
> The new version is available at https://github.com/darobin/**webidl2.js<https://github.com/darobin/webidl2.js>(all the useful content being currently in the develop branch). You can
> also install it with npm install webidl2.
> Compare to the previous version this one is about 6x less code (which
> translates to 4x smaller minified or 2x smaller minizipped) and 4x faster.
> The test suite still needs a lot of work (which is why I'm not considering
> this to be final) but most importantly I believe this to be much more
> correct and to be up to date with features currently in the draft. It also
> has far better error reporting.
> The parsing interface is simple. In node, you require it and call
> parse(idlSource) on that. In the browser it creates a global WebIDL2 object
> on which to call that (I haven't run the TS in the browser yet).
> The AST you get is very similar to the one you got in v1, but some
> adjustments have been made in order to be more systematic, and to map
> better to what's actually in the spec now.
> So if you're using v1, I invite you to give v2 a ride and tell me how it
> goes.
> --
> Robin Berjon - http://berjon.com/ - @robinberjon
Received on Wednesday, 31 October 2012 07:08:47 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:07 UTC