Expand description
Contains a lexer and parser for the WebIDL grammar.
Modules§
- Contains all structures related to the AST for the WebIDL grammar.
- Contains the visitor trait needed to traverse the AST and helper walk functions.
Structs§
- The lexer that is used to perform lexical analysis on the WebIDL grammar. The lexer implements the
Iteratortrait, so in order to retrieve the tokens, you simply have to iterate over it. - The error that is returned when an error occurs during lexing.
Enums§
- An enum of possible errors that can occur during lexing.
- An enum of all possible tokens allowed by the WebIDL grammar A token in this case is a terminal, either a static string or regular expression based token. Note that not all possible simplifications are made such as converting the
TrueandFalsetokens to actual booleans. This choice was made to be as consistent as possible with the WebIDL grammar.
Functions§
- Parses a given input string and returns an AST.
Type Aliases§
- The result that is returned when an input string is parsed. If the parse succeeds, the
Okresult will be a vector of definitions representing the AST. If the parse fails, theErrwill be either an error from the lexer or the parser.