diff options
author | Aleksey Kladov <[email protected]> | 2020-10-06 19:06:14 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-10-06 19:06:14 +0100 |
commit | d7991f5f21c11d4d2498a3d2720fbfd490364d36 (patch) | |
tree | 5f37dcd9202f991ec40ca28b4a1653aa60697849 /crates | |
parent | 57735f2a32138d552c51c4b2de04bcd56650db15 (diff) |
Document privacy invariant of SyntaxPtr
Diffstat (limited to 'crates')
-rw-r--r-- | crates/syntax/src/ptr.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/syntax/src/ptr.rs b/crates/syntax/src/ptr.rs index ca7957747..d3fb7a5d9 100644 --- a/crates/syntax/src/ptr.rs +++ b/crates/syntax/src/ptr.rs | |||
@@ -12,6 +12,8 @@ use crate::{AstNode, SyntaxKind, SyntaxNode, TextRange}; | |||
12 | /// specific node across reparses of the same file. | 12 | /// specific node across reparses of the same file. |
13 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 13 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
14 | pub struct SyntaxNodePtr { | 14 | pub struct SyntaxNodePtr { |
15 | // Don't expose this field further. At some point, we might want to replace | ||
16 | // range with node id. | ||
15 | pub(crate) range: TextRange, | 17 | pub(crate) range: TextRange, |
16 | kind: SyntaxKind, | 18 | kind: SyntaxKind, |
17 | } | 19 | } |