feat: report errors in macro definition

Reporting macro *definition* error at the macro *call site* is a rather
questionable approach, but at least we don't erase the errors
altogether!
This commit is contained in:
Aleksey Kladov
2021-10-09 15:23:55 +03:00
parent b3d1de93af
commit ef1251f696
10 changed files with 121 additions and 95 deletions

View File

@@ -143,7 +143,7 @@ impl HirFileId {
_ => None,
});
let macro_def = db.macro_def(loc.def)?;
let macro_def = db.macro_def(loc.def).ok()?;
let (parse, exp_map) = db.parse_macro_expansion(macro_file).value?;
let macro_arg = db.macro_arg(macro_file.macro_call_id)?;