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§
- Callback
Definition - Parses
[attributes]? callback identifier = type ( (arg1, arg2, ..., argN)? );
- Callback
Interface Definition - Parses
[attributes]? callback interface identifier ( : inheritance )? { members };
- Dictionary
Definition - Parses
[attributes]? dictionary identifier ( : inheritance )? { members };
- Enum
Definition - Parses
[attributes]? enum identifier { values };
- Error
- default error type, only contains the error’ location and code
- Implements
Definition - Parses
[attributes]? identifier implements identifier;
- Includes
Statement Definition - Parses
[attributes]? identifier includes identifier;
- Interface
Definition - Parses
[attributes]? interface identifier ( : inheritance )? { members };
- Interface
Mixin Definition - Parses
[attributes]? interface mixin identifier { members };
- Namespace
Definition - Parses
[attributes]? namespace identifier { members };
- Partial
Dictionary Definition - Parses
[attributes]? partial dictionary identifier { members };
- Partial
Interface Definition - Parses
[attributes]? partial interface identifier { members };
- Partial
Interface Mixin Definition - Parses
[attributes]? partial interface mixin identifier { members };
- Partial
Namespace Definition - Parses
[attributes]? partial namespace identifier { members };
- Typedef
Definition - Parses
[attributes]? typedef attributedtype identifier;
Enums§
- Definition
- Parses a definition
- Err
- The
Err
enum indicates the parser was not successful
Traits§
Functions§
- parse
- A convenient parse function
Type Aliases§
- Definitions
- Parses WebIDL definitions. It is the root struct for a complete WebIDL definition.
- Enum
Value List - Parses a non-empty enum value list
- IResult
- Holds the result of parsing functions