Track span information of include statements
diff --git a/syntax/mod.rs b/syntax/mod.rs
index c8dea67..2eccdb6 100644
--- a/syntax/mod.rs
+++ b/syntax/mod.rs
@@ -34,7 +34,7 @@
pub use self::types::Types;
pub enum Api {
- Include(String),
+ Include(Include),
Struct(Struct),
Enum(Enum),
CxxType(ExternType),
@@ -45,6 +45,19 @@
Impl(Impl),
}
+pub struct Include {
+ pub path: String,
+ pub kind: IncludeKind,
+ pub begin_span: Span,
+ pub end_span: Span,
+}
+
+#[derive(Copy, Clone, PartialEq)]
+pub enum IncludeKind {
+ Quoted, // #include "quoted/path/to"
+ Bracketed, // #include <bracketed/path/to>
+}
+
pub struct ExternType {
pub doc: Doc,
pub type_token: Token![type],