Collect name-related structs to the bottom of syntax tree definition
diff --git a/syntax/mod.rs b/syntax/mod.rs
index d770d49..12d8178 100644
--- a/syntax/mod.rs
+++ b/syntax/mod.rs
@@ -35,16 +35,6 @@
pub use self::parse::parse_items;
pub use self::types::Types;
-#[derive(Clone)]
-/// A C++ identifier in a particular namespace.
-/// It is intentional that this does not impl Display,
-/// because we want to force users actively to decide whether to output
-/// it as a qualified name or as an unqualfiied name.
-pub struct CppName {
- pub ns: Namespace,
- pub ident: Ident,
-}
-
pub enum Api {
Include(Include),
Struct(Struct),
@@ -99,14 +89,6 @@
pub repr: Atom,
}
-/// A type with a defined Rust name and a fully resolved,
-/// qualified, namespaced, C++ name.
-#[derive(Clone)]
-pub struct Pair {
- pub cxx: CppName,
- pub rust: Ident,
-}
-
pub struct ExternFn {
pub lang: Lang,
pub doc: Doc,
@@ -201,6 +183,24 @@
Rust,
}
+/// A type with a defined Rust name and a fully resolved,
+/// qualified, namespaced, C++ name.
+#[derive(Clone)]
+pub struct Pair {
+ pub cxx: CppName,
+ pub rust: Ident,
+}
+
+#[derive(Clone)]
+/// A C++ identifier in a particular namespace.
+/// It is intentional that this does not impl Display,
+/// because we want to force users actively to decide whether to output
+/// it as a qualified name or as an unqualfiied name.
+pub struct CppName {
+ pub ns: Namespace,
+ pub ident: Ident,
+}
+
/// Wrapper for a type which needs to be resolved
/// before it can be printed in C++.
#[derive(Clone, Eq, PartialEq, Hash, Ord, PartialOrd)]