mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Refactor for less laziness (right now)
This commit is contained in:
parent
40f297445d
commit
e954e074fb
6 changed files with 217 additions and 135 deletions
|
@ -703,6 +703,16 @@ pub enum FoundSymbol {
|
|||
Symbol(Symbol),
|
||||
}
|
||||
|
||||
impl FoundSymbol {
|
||||
pub fn implementation_symbol(&self) -> Symbol {
|
||||
match self {
|
||||
FoundSymbol::Specialization(_, sym)
|
||||
| FoundSymbol::AbilityMember(_, sym)
|
||||
| FoundSymbol::Symbol(sym) => *sym,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Given an ability Foo implements foo : ..., returns (T, foo1) if the symbol at the given region is a
|
||||
/// Like [find_type_at], but descends into the narrowest node containing [position].
|
||||
pub fn find_closest_type_at(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue