From 07a6d69dbe837248e5228f6c187b03262f5de15d6c163c713c36cf09d18fccd6 Mon Sep 17 00:00:00 2001 From: Apache Date: Fri, 21 Jun 2024 21:16:57 -0500 Subject: [PATCH] Add README.md, small additions --- .gitignore | 2 +- Cargo.toml | 1 + README.md | 30 ++++++++++++++++++++ assets/holy_lisp.svg | 65 ++++++++++++++++++++++++++++++++++++++++++++ src/lib.rs | 8 ++++++ src/test.lisp | 12 +------- 6 files changed, 106 insertions(+), 12 deletions(-) create mode 100644 README.md create mode 100644 assets/holy_lisp.svg create mode 100644 src/lib.rs diff --git a/.gitignore b/.gitignore index f0301ff..cb283d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/target +/target \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index d5d29f3..bd7c342 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,5 +2,6 @@ name = "holy_lisp" version = "0.1.0" edition = "2021" +authors = ["Apache "] [dependencies] diff --git a/README.md b/README.md new file mode 100644 index 0000000..360fb0f --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# Holy Lisp + +Holy Lisp Logo + +An opinionated lisp implementation developed in the most intuitive way I could come up with. + +## Features + +### Lists with a function as the **first element** are evaluated when needed + +```lisp +(print (add 1 2)) ; => 3 +(print (1 2 3)) ; => (1 2 3) +``` + +### Quoted lists are **not evaluated** + +```lisp +(print '(add 1 2)) ; => '( 1 2) +``` + +### Elements within quoted lists can be unquoted + +```lisp +(print + '(add + 1 ,(sub 3 1) + ) +) ; => '( 1 2) +``` \ No newline at end of file diff --git a/assets/holy_lisp.svg b/assets/holy_lisp.svg new file mode 100644 index 0000000..3ef33ff --- /dev/null +++ b/assets/holy_lisp.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..f5958ed --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,8 @@ +mod tokenizer; +pub use tokenizer::*; + +mod parser; +pub use parser::*; + +mod executor; +pub use executor::*; \ No newline at end of file diff --git a/src/test.lisp b/src/test.lisp index 7afb957..f162e02 100644 --- a/src/test.lisp +++ b/src/test.lisp @@ -1,11 +1 @@ -; This is a comment - -(print - (add - (div - 4.5 - (sub 0.5 0.2) - ) - (mul 21 0.05) - ) -) \ No newline at end of file +(print '(add 1 2)) \ No newline at end of file