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