Implement parsing () type
diff --git a/syntax/mod.rs b/syntax/mod.rs
index 1acb9a5..e702be0 100644
--- a/syntax/mod.rs
+++ b/syntax/mod.rs
@@ -13,13 +13,13 @@
mod tokens;
pub mod types;
-use self::span::Span;
use proc_macro2::Ident;
use syn::{LitStr, Token};
pub use self::atom::Atom;
pub use self::doc::Doc;
pub use self::parse::parse_items;
+pub use self::span::Span;
pub use self::types::Types;
pub enum Api {
diff --git a/syntax/parse.rs b/syntax/parse.rs
index efe6ff8..1453b30 100644
--- a/syntax/parse.rs
+++ b/syntax/parse.rs
@@ -1,5 +1,5 @@
use crate::syntax::{
- attrs, error, Api, Atom, Doc, ExternFn, ExternType, Receiver, Ref, Struct, Ty1, Type, Var,
+ self, attrs, error, Api, Atom, Doc, ExternFn, ExternType, Receiver, Ref, Struct, Ty1, Type, Var,
};
use proc_macro2::Ident;
use quote::quote;
@@ -251,6 +251,9 @@
}
}
}
+ RustType::Tuple(ty) if ty.elems.is_empty() => {
+ return Ok(Type::Void(syntax::Span(ty.paren_token.span)));
+ }
_ => {}
}
Err(Error::new_spanned(ty, "unsupported type"))