Adding library for high-level code generators.
The intention here is to provide a way for high level code generators
to convert a Rust TokenStream into C++ bindings code without the need
to write files to disk or invoke an external command.
diff --git a/gen/src/error.rs b/gen/src/error.rs
index 51dbbe7..61afd4d 100644
--- a/gen/src/error.rs
+++ b/gen/src/error.rs
@@ -11,13 +11,18 @@
use std::path::Path;
use std::process;
-pub(super) type Result<T, E = Error> = std::result::Result<T, E>;
+pub type Result<T, E = Error> = std::result::Result<T, E>;
#[derive(Debug)]
-pub(super) enum Error {
+pub enum Error {
+ /// No `#[cxx::bridge]` module could be found.
NoBridgeMod,
+ /// `#[cxx::bridge]` was attached to something other than
+ /// an inline module.
OutOfLineMod,
+ /// An IO error occurred when reading Rust code.
Io(io::Error),
+ /// A syntax error occurred when parsing Rust code.
Syn(syn::Error),
}