documentation and cargo.toml changes

This commit is contained in:
2024-10-14 16:26:56 -04:00
parent d5e64abcdb
commit c1a514dd9d
5 changed files with 7 additions and 0 deletions

View File

@@ -2,6 +2,9 @@
name = "lamm"
version = "0.1.0"
edition = "2021"
license = "MIT"
description = "a simple, functional paradigm programming language which uses Polish notation"
repository = "https://github.com/minneelyyyy/lamm"
[dependencies]
regex = "1.11"

View File

@@ -60,6 +60,7 @@ enum Object {
Function(Function),
}
/// Executes an input of ParseTrees
pub struct Executor<I: Iterator<Item = Result<ParseTree, ParseError>>> {
exprs: I,
globals: HashMap<String, Object>,

View File

@@ -34,6 +34,7 @@ impl Display for Type {
}
}
/// Represents the result of executing a ParseTree with an Executor
#[derive(Clone, Debug, PartialEq)]
pub enum Value {
Float(f64),

View File

@@ -239,6 +239,7 @@ impl ParseTree {
}
}
/// Parses input tokens and produces ParseTrees for an Executor
pub struct Parser<I: Iterator<Item = Result<Token, TokenizeError>>> {
tokens: I,

View File

@@ -148,6 +148,7 @@ impl Token {
}
}
/// Tokenize an input stream of source code for a Parser
pub struct Tokenizer<R: BufRead> {
reader: R,
tokens: VecDeque<Token>,