hir::Crate boilerplate

This commit is contained in:
Aleksey Kladov 2018-12-08 23:40:55 +03:00
parent 9b1356464a
commit 9c6c7ec2da
2 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,15 @@
use crate::FileId;
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct CrateId(u32);
#[derive(Debug)]
pub struct Crate {
root: FileId,
}
impl Crate {
pub fn dependencies(&self) -> Vec<CrateId> {
Vec::new()
}
}

View File

@ -18,12 +18,15 @@ pub mod db;
#[cfg(test)]
mod mock;
mod query_definitions;
mod function;
mod module;
mod path;
mod arena;
pub mod source_binder;
mod krate;
mod module;
mod function;
use std::ops::Index;
use ra_syntax::{SyntaxNodeRef, SyntaxNode};
@ -36,6 +39,7 @@ use crate::{
pub use self::{
path::{Path, PathKind},
krate::Crate,
module::{Module, ModuleId, Problem, nameres::ItemMap},
function::{Function, FnScopes},
};