aboutsummaryrefslogtreecommitdiff
path: root/mingling_pathf/src/patterns/pack.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mingling_pathf/src/patterns/pack.rs')
-rw-r--r--mingling_pathf/src/patterns/pack.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/mingling_pathf/src/patterns/pack.rs b/mingling_pathf/src/patterns/pack.rs
index c80fb65..76597ba 100644
--- a/mingling_pathf/src/patterns/pack.rs
+++ b/mingling_pathf/src/patterns/pack.rs
@@ -18,7 +18,10 @@ pub struct PackPattern;
impl AnalyzePattern for PackPattern {
fn contains(&self, content: &str) -> bool {
- content.contains("pack!") || content.contains("pack_err!")
+ content.contains("pack!")
+ || content.contains("pack_err!")
+ || content.contains("pack_structural!")
+ || content.contains("pack_err_structural!")
}
fn analyze(&self, content: &str) -> Vec<AnalyzeItem> {
@@ -33,10 +36,7 @@ impl AnalyzePattern for PackPattern {
// Top-level macro calls
Item::Macro(m) => {
if let Some(name) = try_extract_pack_name(m) {
- items.push(AnalyzeItem {
- module: String::new(),
- item_name: name,
- });
+ items.push(AnalyzeItem::local(String::new(), name));
}
}
// Macro calls inside inline modules
@@ -46,10 +46,7 @@ impl AnalyzePattern for PackPattern {
if let Item::Macro(m) = n
&& let Some(name) = try_extract_pack_name(m)
{
- items.push(AnalyzeItem {
- module: item_mod.ident.to_string(),
- item_name: name,
- });
+ items.push(AnalyzeItem::local(item_mod.ident.to_string(), name));
}
}
}