Expand description
A common backend for bindgen crates.
This (internal) crate provides functionality common to multiple bindgen dependency crates. There are 4 main things exported from this crate:
- 
Provides the ability to attempt conversion from an AST struct into a TokenStream 
- 
A struct used to provide diagnostic responses for failures of said tokenization 
- 
Abstract Syntax Tree types used to represent a Rust program, with the necessary metadata to generate bindings for it 
- 
Common utilities for manipulating parsed types from syn 
Modules§
- ast
- A representation of the Abstract Syntax Tree of a Rust program, with all the added metadata necessary to generate Wasm bindings for it.
- util
- Common utility function for manipulating syn types and handling parsed values
Macros§
- bail_span 
- Immediately fail and return an Err, with the arguments passed to err_span!
- err_span 
- Provide a Diagnostic with the given span and message
Structs§
- Diagnostic
- A struct representing a diagnostic to emit to the end-user as an error.
Traits§
- TryToTokens 
- A trait for converting AST structs into Tokens and adding them to a TokenStream, or providing a diagnostic if conversion fails.