reduce visibility

This commit is contained in:
Aleksey Kladov 2019-10-29 16:08:06 +03:00
parent 1ec418c3b8
commit 3260639608

View file

@ -50,7 +50,7 @@ pub struct AstIdMap {
} }
impl AstIdMap { impl AstIdMap {
pub fn from_source(node: &SyntaxNode) -> AstIdMap { pub(crate) fn from_source(node: &SyntaxNode) -> AstIdMap {
assert!(node.parent().is_none()); assert!(node.parent().is_none());
let mut res = AstIdMap { arena: Arena::default() }; let mut res = AstIdMap { arena: Arena::default() };
// By walking the tree in bread-first order we make sure that parents // By walking the tree in bread-first order we make sure that parents
@ -83,7 +83,7 @@ impl AstIdMap {
} }
} }
pub fn get<N: AstNode>(&self, id: FileAstId<N>) -> AstPtr<N> { pub(crate) fn get<N: AstNode>(&self, id: FileAstId<N>) -> AstPtr<N> {
self.arena[id.raw].cast::<N>().unwrap() self.arena[id.raw].cast::<N>().unwrap()
} }