Document privacy invariant of SyntaxPtr

This commit is contained in:
Aleksey Kladov 2020-10-06 20:06:14 +02:00
parent 57735f2a32
commit d7991f5f21

View File

@ -12,6 +12,8 @@ use crate::{AstNode, SyntaxKind, SyntaxNode, TextRange};
/// specific node across reparses of the same file.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct SyntaxNodePtr {
// Don't expose this field further. At some point, we might want to replace
// range with node id.
pub(crate) range: TextRange,
kind: SyntaxKind,
}