Move extern fn signature fields to struct
This will allow reusing the Signature struct for the type of function
pointers.
diff --git a/syntax/mod.rs b/syntax/mod.rs
index 79a4a7b..f2e1c1c 100644
--- a/syntax/mod.rs
+++ b/syntax/mod.rs
@@ -46,13 +46,17 @@
pub struct ExternFn {
pub lang: Lang,
pub doc: Doc,
- pub fn_token: Token![fn],
pub ident: Ident,
+ pub sig: Signature,
+ pub semi_token: Token![;],
+}
+
+pub struct Signature {
+ pub fn_token: Token![fn],
pub receiver: Option<Receiver>,
pub args: Vec<Var>,
pub ret: Option<Type>,
pub throws: bool,
- pub semi_token: Token![;],
}
pub struct Var {