diff options
author | Florian Diebold <[email protected]> | 2019-01-19 20:23:26 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2019-02-01 21:14:34 +0000 |
commit | 5208c2aa930ae452e062dcdc2563c1bbb67d2e4a (patch) | |
tree | 9d6c6868485a8013c420a7ba74a29930d9c85737 /crates/ra_hir/src/expr | |
parent | 2b5c226e86892113bcab478cdf4c9adaf1e7b2f6 (diff) |
Sketching the resolver API
Diffstat (limited to 'crates/ra_hir/src/expr')
-rw-r--r-- | crates/ra_hir/src/expr/scope.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_hir/src/expr/scope.rs b/crates/ra_hir/src/expr/scope.rs index b7971088d..504a087a3 100644 --- a/crates/ra_hir/src/expr/scope.rs +++ b/crates/ra_hir/src/expr/scope.rs | |||
@@ -73,6 +73,7 @@ impl ExprScopes { | |||
73 | context_expr: ExprId, | 73 | context_expr: ExprId, |
74 | name: Name, | 74 | name: Name, |
75 | ) -> Option<&'a ScopeEntry> { | 75 | ) -> Option<&'a ScopeEntry> { |
76 | // TODO replace by Resolver::resolve_name | ||
76 | let mut shadowed = FxHashSet::default(); | 77 | let mut shadowed = FxHashSet::default(); |
77 | let ret = self | 78 | let ret = self |
78 | .scope_chain_for(context_expr) | 79 | .scope_chain_for(context_expr) |
@@ -179,6 +180,7 @@ impl ScopesWithSyntaxMapping { | |||
179 | 180 | ||
180 | // XXX: during completion, cursor might be outside of any particular | 181 | // XXX: during completion, cursor might be outside of any particular |
181 | // expression. Try to figure out the correct scope... | 182 | // expression. Try to figure out the correct scope... |
183 | // TODO: move this to source binder? | ||
182 | fn adjust(&self, ptr: SyntaxNodePtr, original_scope: ScopeId, offset: TextUnit) -> ScopeId { | 184 | fn adjust(&self, ptr: SyntaxNodePtr, original_scope: ScopeId, offset: TextUnit) -> ScopeId { |
183 | let r = ptr.range(); | 185 | let r = ptr.range(); |
184 | let child_scopes = self | 186 | let child_scopes = self |