aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/expr.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2019-01-19 20:23:26 +0000
committerFlorian Diebold <[email protected]>2019-02-01 21:14:34 +0000
commit5208c2aa930ae452e062dcdc2563c1bbb67d2e4a (patch)
tree9d6c6868485a8013c420a7ba74a29930d9c85737 /crates/ra_hir/src/expr.rs
parent2b5c226e86892113bcab478cdf4c9adaf1e7b2f6 (diff)
Sketching the resolver API
Diffstat (limited to 'crates/ra_hir/src/expr.rs')
-rw-r--r--crates/ra_hir/src/expr.rs11
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
12use crate::{ 12use 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};
17use crate::ty::primitive::{UintTy, UncertainIntTy, UncertainFloatTy}; 17use crate::ty::primitive::{UintTy, UncertainIntTy, UncertainFloatTy};
18 18
19pub use self::scope::{ExprScopes, ScopesWithSyntaxMapping, ScopeEntryWithSyntax}; 19pub use self::scope::{ExprScopes, ScopesWithSyntaxMapping, ScopeEntryWithSyntax};
20 20
21mod scope; 21pub(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)]
24pub struct ExprId(RawId); 24pub 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
67impl Index<ExprId> for Body { 72impl Index<ExprId> for Body {