mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-07-30 03:21:57 +00:00
Result-ify src/parser.rs
(#608)
* Make ConvertToAst trait fallible It's got some panics, and we'll be switching those to errors! * First example of a diagnostic-driven error Add a diagnostic-driven error `#[wasm_bindgen]` being attached to public functions, and add some macros to boot to make it easier to generate errors! * Result-ify `src/parser.rs` This commit converts all of `src/parser.rs` away from panics to using `Diagnostic` instead. Along the way this adds a test case per changed `panic!`, ensuring that we don't regress in these areas!
This commit is contained in:
1
crates/macro-support/src/lib.rs
Executable file → Normal file
1
crates/macro-support/src/lib.rs
Executable file → Normal file
@@ -7,6 +7,7 @@ extern crate proc_macro2;
|
||||
extern crate quote;
|
||||
#[macro_use]
|
||||
extern crate syn;
|
||||
#[macro_use]
|
||||
extern crate wasm_bindgen_backend as backend;
|
||||
extern crate wasm_bindgen_shared as shared;
|
||||
|
||||
|
Reference in New Issue
Block a user