feat: implement hover on when clause patterns
This commit is contained in:
@@ -1169,8 +1169,10 @@ impl TypedClause {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn find_node(&self, byte_index: usize) -> Option<Located<'_>> {
|
||||
self.then.find_node(byte_index)
|
||||
pub fn find_node(&self, byte_index: usize, subject_type: &Rc<Type>) -> Option<Located<'_>> {
|
||||
self.pattern
|
||||
.find_node(byte_index, subject_type)
|
||||
.or_else(|| self.then.find_node(byte_index))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -378,7 +378,7 @@ impl TypedExpr {
|
||||
.or_else(|| {
|
||||
clauses
|
||||
.iter()
|
||||
.find_map(|clause| clause.find_node(byte_index))
|
||||
.find_map(|clause| clause.find_node(byte_index, &subject.tipo()))
|
||||
})
|
||||
.or(Some(Located::Expression(self))),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user