From 57782d3ed6cc61db21828b34701bf3411c39951d Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 8 Aug 2024 22:44:34 -0400 Subject: [PATCH] Clean up docs --- dust-lang/src/analyzer.rs | 14 +++++++------- dust-lang/src/type.rs | 22 +++++++++++----------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dust-lang/src/analyzer.rs b/dust-lang/src/analyzer.rs index ace66ad..0adcb35 100644 --- a/dust-lang/src/analyzer.rs +++ b/dust-lang/src/analyzer.rs @@ -1,10 +1,10 @@ -/// Tools for analyzing an abstract syntax tree and catch errors before running the virtual -/// machine. -/// -/// This module provides to anlysis options, both of which borrow an abstract syntax tree and a -/// hash map of variables: -/// - `analyze` convenience function -/// - `Analyzer` struct +//! Tools for analyzing an abstract syntax tree and catch errors before running the virtual +//! machine. +//! +//! This module provides to anlysis options, both of which borrow an abstract syntax tree and a +//! hash map of variables: +//! - `analyze` convenience function +//! - `Analyzer` struct use std::{ collections::HashMap, error::Error, diff --git a/dust-lang/src/type.rs b/dust-lang/src/type.rs index 8ffd7ac..b768b4b 100644 --- a/dust-lang/src/type.rs +++ b/dust-lang/src/type.rs @@ -1,14 +1,14 @@ -/// Description of a kind of value. -/// -/// 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 -/// interpreter should use the analysis phase to enforce that all Generic types have a concrete -/// 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 -/// 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))`. +//! Description of a kind of value. +//! +//! 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 +//! interpreter should use the analysis phase to enforce that all Generic types have a concrete +//! 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 +//! 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))`. use std::{ collections::BTreeMap, fmt::{self, Display, Formatter},