aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_expand
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_expand')
-rw-r--r--crates/ra_hir_expand/src/db.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs
index a7aa60fc9..f5c8bc22f 100644
--- a/crates/ra_hir_expand/src/db.rs
+++ b/crates/ra_hir_expand/src/db.rs
@@ -133,7 +133,6 @@ pub(crate) fn macro_expand(
133 macro_expand_with_arg(db, id, None) 133 macro_expand_with_arg(db, id, None)
134} 134}
135 135
136// TODO hack
137pub fn expander( 136pub fn expander(
138 db: &dyn AstDatabase, 137 db: &dyn AstDatabase,
139 id: MacroCallId, 138 id: MacroCallId,
@@ -141,8 +140,7 @@ pub fn expander(
141 let lazy_id = match id { 140 let lazy_id = match id {
142 MacroCallId::LazyMacro(id) => id, 141 MacroCallId::LazyMacro(id) => id,
143 MacroCallId::EagerMacro(_id) => { 142 MacroCallId::EagerMacro(_id) => {
144 // TODO 143 return None;
145 unimplemented!()
146 } 144 }
147 }; 145 };
148 146
@@ -159,8 +157,11 @@ pub(crate) fn macro_expand_with_arg(
159 let lazy_id = match id { 157 let lazy_id = match id {
160 MacroCallId::LazyMacro(id) => id, 158 MacroCallId::LazyMacro(id) => id,
161 MacroCallId::EagerMacro(id) => { 159 MacroCallId::EagerMacro(id) => {
162 // TODO 160 if arg.is_some() {
163 return Ok(db.lookup_intern_eager_expansion(id).subtree); 161 return Err("hypothetical macro expansion not implemented for eager macro".to_owned());
162 } else {
163 return Ok(db.lookup_intern_eager_expansion(id).subtree);
164 }
164 } 165 }
165 }; 166 };
166 167