Add more docs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//! FIXME: write short doc here
|
||||
//! Collection of assorted algorithms for syntax trees.
|
||||
|
||||
use std::{hash::BuildHasherDefault, ops::RangeInclusive};
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
//! FIXME: write short doc here
|
||||
//! Some infrastructure for fuzzy testing.
|
||||
//!
|
||||
//! We don't normally run fuzzying, so this is hopelessly bitrotten :(
|
||||
|
||||
use std::{
|
||||
convert::TryInto,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! FIXME: write short doc here
|
||||
//! See [`TextTreeSink`].
|
||||
|
||||
use std::mem;
|
||||
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
//! FIXME: write short doc here
|
||||
//! In rust-analyzer, syntax trees are transient objects.
|
||||
//!
|
||||
//! That means that we create trees when we need them, and tear them down to
|
||||
//! save memory. In this architecture, hanging on to a particular syntax node
|
||||
//! for a long time is ill-advisable, as that keeps the whole tree resident.
|
||||
//!
|
||||
//! Instead, we provide a [`SyntaxNodePtr`] type, which stores information about
|
||||
//! *location* of a particular syntax node in a tree. Its a small type which can
|
||||
//! be cheaply stored, and which can be resolved to a real [`SyntaxNode`] when
|
||||
//! necessary.
|
||||
|
||||
use std::{
|
||||
hash::{Hash, Hasher},
|
||||
|
||||
Reference in New Issue
Block a user