pub mod proc_macro;
pub mod quote;
pub mod eager;
+pub mod mod_path;
use base_db::ProcMacroKind;
use either::Either;
pub use mbe::{ExpandError, ExpandResult, Origin};
+use mod_path::ModPath;
use std::{hash::Hash, iter, sync::Arc};
.to_node(db)
.doc_comments_and_attrs()
.nth(invoc_attr_index as usize)
- .and_then(Either::right)?
+ .and_then(Either::left)?
.token_tree()?;
Some(InFile::new(ast_id.file_id, tt))
}
.doc_comments_and_attrs()
.nth(derive_attr_index as usize)
.expect("missing derive")
- .expect_right("derive is a doc comment?")
+ .expect_left("derive is a doc comment?")
.syntax()
.text_range()
}
.doc_comments_and_attrs()
.nth(invoc_attr_index as usize)
.expect("missing attribute")
- .expect_right("attribute macro is a doc comment?")
+ .expect_left("attribute macro is a doc comment?")
.syntax()
.text_range(),
};
let attr = item
.doc_comments_and_attrs()
.nth(*invoc_attr_index as usize)
- .and_then(Either::right)?;
+ .and_then(Either::left)?;
match attr.token_tree() {
Some(token_tree)
if token_tree.syntax().text_range().contains_range(token_range) =>
}
}
}
+
+#[derive(Debug)]
+pub struct UnresolvedMacro {
+ pub path: ModPath,
+}