Update ungrammar

This commit is contained in:
Jonas Schievink 2021-06-11 18:12:51 +02:00
parent 80b3b74018
commit 1d6eef1350
43 changed files with 801 additions and 676 deletions

View file

@ -208,7 +208,7 @@ pub(crate) fn hover(
}
fn try_hover_for_attribute(token: &SyntaxToken) -> Option<RangeInfo<HoverResult>> {
let attr = token.ancestors().nth(1).and_then(ast::Attr::cast)?;
let attr = token.ancestors().find_map(ast::Attr::cast)?;
let (path, tt) = attr.as_simple_call()?;
if !tt.syntax().text_range().contains(token.text_range().start()) {
return None;