Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
docs: add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aripiprazole committed Nov 23, 2023
1 parent f775e2d commit 5036a9d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@

use std::fmt::Display;

pub type Result<T, E = SemanticError> = std::result::Result<T, E>;

/// Evaluation of the Soft programming language, it will transform an [crate::Expr] into
/// a [crate::eval::Value].
pub mod eval;
pub mod parser;

pub type Result<T, E = SemanticError> = std::result::Result<T, E>;
/// Tokenization/lexing and parsing of Soft programming language, it will transform a string
/// into [crate::Term].
pub mod parser;

/// Term is a recursive data structure that represents a list of terms, an atom, an identifier,
/// or an integer.
Expand All @@ -30,6 +35,9 @@ pub trait ExprKind: Sized {

// Abstract-Syntax-Tree (AST) for the Soft programming language. It's the representation
// of abstract terms in the language.
//
// It's the specialized phase of the language, where we have a concrete syntax and we
// can start to evaluate the program.
define_ast!(Expr, {
Fun, // (fun* [a b] (+ a b))
List, // [a b c] or (list a b c)
Expand Down

0 comments on commit 5036a9d

Please sign in to comment.