mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Wrap macros in expr position in MacroExpr
node
This commit is contained in:
parent
5a6918f1c4
commit
872b7b9660
31 changed files with 642 additions and 548 deletions
|
@ -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()),
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue