Wrap macros in expr position in MacroExpr node

This commit is contained in:
Jonas Schievink 2022-04-05 17:42:07 +02:00
parent 5a6918f1c4
commit 872b7b9660
31 changed files with 642 additions and 548 deletions

View file

@ -110,8 +110,8 @@ impl SourceAnalyzer {
fn expr_id(&self, db: &dyn HirDatabase, expr: &ast::Expr) -> Option<ExprId> {
let src = match expr {
ast::Expr::MacroCall(call) => {
self.expand_expr(db, InFile::new(self.file_id, call.clone()))?
ast::Expr::MacroExpr(expr) => {
self.expand_expr(db, InFile::new(self.file_id, expr.macro_call()?.clone()))?
}
_ => InFile::new(self.file_id, expr.clone()),
};