diff --git a/Cargo.toml b/Cargo.toml index b4aa823..cb41074 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" \ No newline at end of file diff --git a/src/executor.rs b/src/executor.rs index 77f1bb2..40d3515 100644 --- a/src/executor.rs +++ b/src/executor.rs @@ -60,6 +60,7 @@ enum Object { Function(Function), } +/// Executes an input of ParseTrees pub struct Executor>> { exprs: I, globals: HashMap, diff --git a/src/lib.rs b/src/lib.rs index 446b5ce..228b459 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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), diff --git a/src/parser.rs b/src/parser.rs index 6c35c53..a53e134 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -239,6 +239,7 @@ impl ParseTree { } } +/// Parses input tokens and produces ParseTrees for an Executor pub struct Parser>> { tokens: I, diff --git a/src/tokenizer.rs b/src/tokenizer.rs index a42507f..ecf6c28 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -148,6 +148,7 @@ impl Token { } } +/// Tokenize an input stream of source code for a Parser pub struct Tokenizer { reader: R, tokens: VecDeque,