Sketching the resolver API

This commit is contained in:
Florian Diebold 2019-01-19 21:23:26 +01:00
parent 2b5c226e86
commit 5208c2aa93
8 changed files with 134 additions and 11 deletions

View file

@ -10,15 +10,15 @@ use ra_syntax::{
};
use crate::{
Path, Name, Function,
name::AsName, HirDatabase,
Path, Name, HirDatabase, Function, Resolver,
name::AsName,
type_ref::{Mutability, TypeRef},
};
use crate::ty::primitive::{UintTy, UncertainIntTy, UncertainFloatTy};
pub use self::scope::{ExprScopes, ScopesWithSyntaxMapping, ScopeEntryWithSyntax};
mod scope;
pub(crate) mod scope;
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ExprId(RawId);
@ -62,6 +62,11 @@ impl Body {
pub fn body_expr(&self) -> ExprId {
self.body_expr
}
#[allow(unused_variables)]
pub fn resolver_for_expr(&self, expr_id: ExprId) -> Resolver {
unimplemented!()
}
}
impl Index<ExprId> for Body {