Move extern fn signature fields to struct
This will allow reusing the Signature struct for the type of function
pointers.
diff --git a/syntax/impls.rs b/syntax/impls.rs
index 741431a..dfaab55 100644
--- a/syntax/impls.rs
+++ b/syntax/impls.rs
@@ -1,6 +1,15 @@
-use crate::syntax::{Ref, Ty1, Type};
+use crate::syntax::{ExternFn, Ref, Signature, Ty1, Type};
use std::hash::{Hash, Hasher};
use std::mem;
+use std::ops::Deref;
+
+impl Deref for ExternFn {
+ type Target = Signature;
+
+ fn deref(&self) -> &Self::Target {
+ &self.sig
+ }
+}
impl Hash for Type {
fn hash<H: Hasher>(&self, state: &mut H) {