12 releases (7 breaking)

0.8.0 Sep 16, 2018
0.6.1 Aug 6, 2018
0.5.0 Jul 26, 2018

#20 in Parser implementations

Download history 282/week @ 2018-10-11 384/week @ 2018-10-18 284/week @ 2018-10-25 368/week @ 2018-11-01 320/week @ 2018-11-08 326/week @ 2018-11-15 296/week @ 2018-11-22 427/week @ 2018-11-29 460/week @ 2018-12-06 382/week @ 2018-12-13 423/week @ 2018-12-20 497/week @ 2018-12-27 358/week @ 2019-01-03

1,645 downloads per month
Used in 23 crates (3 directly)

MIT license

87KB
2.5K SLoC

Weedle - A WebIDL Parser

Parses valid WebIDL definitions & produces a data structure starting from Definitions.

Basic Usage

In Cargo.toml

[dependencies]
weedle = "0.5.0"

Then, in src/main.rs

extern crate weedle;

fn main() {
    let parsed = weedle::parse("
        interface Window {
            readonly attribute Storage sessionStorage;
        };
    ").unwrap();
    println!("{:?}", parsed);
}

lib.rs:

Weedle - A WebIDL Parser

Parses valid WebIDL definitions & produces a data structure starting from Definitions.

Example

extern crate weedle;

let parsed = weedle::parse("
    interface Window {
        readonly attribute Storage sessionStorage;
    };
").unwrap();
println!("{:?}", parsed);

Note: This parser follows the grammar given at WebIDL.

If any flaws found when parsing string with a valid grammar, create an issue.

Dependencies

~600KB
~14K SLoC