Expand description

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.

Modules

Macros

Structs

Parses [attributes]? callback identifier = type ( (arg1, arg2, ..., argN)? );

Parses [attributes]? callback interface identifier ( : inheritance )? { members };

Parses [attributes]? dictionary identifier ( : inheritance )? { members };

Parses [attributes]? enum identifier { values };

default error type, only contains the error’ location and code

Parses [attributes]? identifier implements identifier;

Parses [attributes]? identifier includes identifier;

Parses [attributes]? interface identifier ( : inheritance )? { members };

Parses [attributes]? interface mixin identifier { members };

Parses [attributes]? namespace identifier { members };

Parses [attributes]? partial dictionary identifier { members };

Parses [attributes]? partial interface identifier { members };

Parses [attributes]? partial interface mixin identifier { members };

Parses [attributes]? partial namespace identifier { members };

Parses [attributes]? typedef attributedtype identifier;

Enums

Parses a definition

The Err enum indicates the parser was not successful

Indicates which parser returned an error

Traits

Functions

A convenient parse function

Type Definitions

Parses WebIDL definitions. It is the root struct for a complete WebIDL definition.

Parses a non-empty enum value list

Holds the result of parsing functions