Clean up docs

This commit is contained in:
Jeff 2024-08-08 22:44:34 -04:00
parent cccbe7a325
commit 57782d3ed6
2 changed files with 18 additions and 18 deletions

View File

@ -1,10 +1,10 @@
/// Tools for analyzing an abstract syntax tree and catch errors before running the virtual //! Tools for analyzing an abstract syntax tree and catch errors before running the virtual
/// machine. //! machine.
/// //!
/// This module provides to anlysis options, both of which borrow an abstract syntax tree and a //! This module provides to anlysis options, both of which borrow an abstract syntax tree and a
/// hash map of variables: //! hash map of variables:
/// - `analyze` convenience function //! - `analyze` convenience function
/// - `Analyzer` struct //! - `Analyzer` struct
use std::{ use std::{
collections::HashMap, collections::HashMap,
error::Error, error::Error,

View File

@ -1,14 +1,14 @@
/// Description of a kind of value. //! Description of a kind of value.
/// //!
/// Most types are concrete and specific, the exceptions are the Generic and Any types. //! Most types are concrete and specific, the exceptions are the Generic and Any types.
/// //!
/// Generic types are temporary placeholders that describe a type that will be defined later. The //! Generic types are temporary placeholders that describe a type that will be defined later. The
/// interpreter should use the analysis phase to enforce that all Generic types have a concrete //! interpreter should use the analysis phase to enforce that all Generic types have a concrete
/// type assigned to them before the program is run. //! type assigned to them before the program is run.
/// //!
/// The Any type is used in cases where a value's type does not matter. For example, the standard //! The Any type is used in cases where a value's type does not matter. For example, the standard
/// library's "length" function does not care about the type of item in the list, only the list //! library's "length" function does not care about the type of item in the list, only the list
/// itself. So the input is defined as `[any]`, i.e. `Type::ListOf(Box::new(Type::Any))`. //! itself. So the input is defined as `[any]`, i.e. `Type::ListOf(Box::new(Type::Any))`.
use std::{ use std::{
collections::BTreeMap, collections::BTreeMap,
fmt::{self, Display, Formatter}, fmt::{self, Display, Formatter},