Rantanen / intercom

Object based cross-language FFI for Rust
MIT License
63 stars 7 forks source link

Syntax errors shouldn't crash the compilation #94

Closed Rantanen closed 5 years ago

Rantanen commented 5 years ago

Intercom attempts to parse the source code in various places. Both before the actual build in build.rs and during the build through the attributes.

If we fail to parse the source code, currently we panic, which prevents the compilation.

This also prevents any proper error messages.

It would be better to emit a warning/error and ignore the rest of the bits. We'll trust in rustc failing the compilation on its own.