File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -133,16 +133,14 @@ pub(crate) fn macro_expand(
133
133
macro_expand_with_arg ( db, id, None )
134
134
}
135
135
136
- // TODO hack
137
136
pub fn expander (
138
137
db : & dyn AstDatabase ,
139
138
id : MacroCallId ,
140
139
) -> Option < Arc < ( TokenExpander , mbe:: TokenMap ) > > {
141
140
let lazy_id = match id {
142
141
MacroCallId :: LazyMacro ( id) => id,
143
142
MacroCallId :: EagerMacro ( _id) => {
144
- // TODO
145
- unimplemented ! ( )
143
+ return None ;
146
144
}
147
145
} ;
148
146
@@ -159,8 +157,11 @@ pub(crate) fn macro_expand_with_arg(
159
157
let lazy_id = match id {
160
158
MacroCallId :: LazyMacro ( id) => id,
161
159
MacroCallId :: EagerMacro ( id) => {
162
- // TODO
163
- return Ok ( db. lookup_intern_eager_expansion ( id) . subtree ) ;
160
+ if arg. is_some ( ) {
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
You can’t perform that action at this time.
0 commit comments