Add module doc comments

ida_star
Wilfred Hughes 2021-07-30 01:23:32 +07:00
parent 0dba462fb3
commit 76c7f35d56
7 changed files with 15 additions and 0 deletions

@ -1,3 +1,6 @@
//! Implements Dijkstra's algorithm for shortest path, to find an
//! optimal and readable diff between two ASTs.
use std::cmp::{min, Ordering, Reverse}; use std::cmp::{min, Ordering, Reverse};
use std::collections::BinaryHeap; use std::collections::BinaryHeap;
use std::hash::{Hash, Hasher}; use std::hash::{Hash, Hasher};

@ -1,3 +1,5 @@
//! A range between ordered values.
/// An interval that is inclusive of `from` but exclusive of `to`. /// An interval that is inclusive of `from` but exclusive of `to`.
/// ///
/// This is a an alternative to `Range`, which has some API warts: /// This is a an alternative to `Range`, which has some API warts:

@ -1,3 +1,5 @@
//! Manipulate lines of text and groups of lines.
use crate::intervals::Interval; use crate::intervals::Interval;
use crate::positions::SingleLineSpan; use crate::positions::SingleLineSpan;
use crate::syntax::{aligned_lines, MatchKind, MatchedPos}; use crate::syntax::{aligned_lines, MatchKind, MatchedPos};

@ -1,3 +1,5 @@
//! Lexes source code and parses delimiters according to `syntax.toml`.
use crate::lines::NewlinePositions; use crate::lines::NewlinePositions;
use crate::positions::SingleLineSpan; use crate::positions::SingleLineSpan;
use crate::syntax::Syntax; use crate::syntax::Syntax;

@ -1,3 +1,5 @@
//! Represents positions within a string.
use crate::lines::LineNumber; use crate::lines::LineNumber;
/// A range within a single line of a string. /// A range within a single line of a string.

@ -1,3 +1,5 @@
//! Apply colours and styling to strings.
use crate::lines::LineNumber; use crate::lines::LineNumber;
use crate::positions::SingleLineSpan; use crate::positions::SingleLineSpan;
use crate::syntax::{MatchKind, MatchedPos}; use crate::syntax::{MatchKind, MatchedPos};

@ -1,3 +1,5 @@
//! Syntax tree definitions with change metadata.
#![allow(clippy::mutable_key_type)] // Hash for Syntax doesn't use mutable fields. #![allow(clippy::mutable_key_type)] // Hash for Syntax doesn't use mutable fields.
use itertools::{EitherOrBoth, Itertools}; use itertools::{EitherOrBoth, Itertools};