make stuff private

This commit is contained in:
Aleksey Kladov 2019-04-13 09:53:02 +03:00
parent cec67b2b65
commit 30481808fb

View file

@ -110,7 +110,7 @@ impl ExprScopes {
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ScopesWithSourceMap {
pub(crate) source_map: Arc<BodySourceMap>,
pub scopes: Arc<ExprScopes>,
pub(crate) scopes: Arc<ExprScopes>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
@ -134,7 +134,7 @@ impl ScopesWithSourceMap {
generate(self.scope_for(node), move |&scope| self.scopes.scopes[scope].parent)
}
pub fn scope_for_offset(&self, offset: TextUnit) -> Option<ScopeId> {
pub(crate) fn scope_for_offset(&self, offset: TextUnit) -> Option<ScopeId> {
self.scopes
.scope_for
.iter()
@ -211,7 +211,7 @@ impl ScopesWithSourceMap {
.collect()
}
pub fn scope_for(&self, node: &SyntaxNode) -> Option<ScopeId> {
pub(crate) fn scope_for(&self, node: &SyntaxNode) -> Option<ScopeId> {
node.ancestors()
.map(SyntaxNodePtr::new)
.filter_map(|ptr| self.source_map.syntax_expr(ptr))