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.rs | |
parent | 2b5c226e86892113bcab478cdf4c9adaf1e7b2f6 (diff) |
Sketching the resolver API
Diffstat (limited to 'crates/ra_hir/src/expr.rs')
-rw-r--r-- | crates/ra_hir/src/expr.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs index f4a950418..6d124fe2f 100644 --- a/crates/ra_hir/src/expr.rs +++ b/crates/ra_hir/src/expr.rs | |||
@@ -10,15 +10,15 @@ use ra_syntax::{ | |||
10 | }; | 10 | }; |
11 | 11 | ||
12 | use crate::{ | 12 | use crate::{ |
13 | Path, Name, Function, | 13 | Path, Name, HirDatabase, Function, Resolver, |
14 | name::AsName, HirDatabase, | 14 | name::AsName, |
15 | type_ref::{Mutability, TypeRef}, | 15 | type_ref::{Mutability, TypeRef}, |
16 | }; | 16 | }; |
17 | use crate::ty::primitive::{UintTy, UncertainIntTy, UncertainFloatTy}; | 17 | use crate::ty::primitive::{UintTy, UncertainIntTy, UncertainFloatTy}; |
18 | 18 | ||
19 | pub use self::scope::{ExprScopes, ScopesWithSyntaxMapping, ScopeEntryWithSyntax}; | 19 | pub use self::scope::{ExprScopes, ScopesWithSyntaxMapping, ScopeEntryWithSyntax}; |
20 | 20 | ||
21 | mod scope; | 21 | pub(crate) mod scope; |
22 | 22 | ||
23 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] | 23 | #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] |
24 | pub struct ExprId(RawId); | 24 | pub struct ExprId(RawId); |
@@ -62,6 +62,11 @@ impl Body { | |||
62 | pub fn body_expr(&self) -> ExprId { | 62 | pub fn body_expr(&self) -> ExprId { |
63 | self.body_expr | 63 | self.body_expr |
64 | } | 64 | } |
65 | |||
66 | #[allow(unused_variables)] | ||
67 | pub fn resolver_for_expr(&self, expr_id: ExprId) -> Resolver { | ||
68 | unimplemented!() | ||
69 | } | ||
65 | } | 70 | } |
66 | 71 | ||
67 | impl Index<ExprId> for Body { | 72 | impl Index<ExprId> for Body { |