diff --git a/Cargo.lock b/Cargo.lock index 322c5d4..71273b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,96 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +[[package]] +name = "aho-corasick" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" +dependencies = [ + "memchr", +] + +[[package]] +name = "cc" +version = "1.0.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bbb73db36c1246e9034e307d0fba23f9a2e251faa47ade70c1bd252220c8311" + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49" + +[[package]] +name = "llvm-sys" +version = "100.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df29b4f2f4e8a5f7871ccad859aa17a171ba251da96bfd55224d53f48a96d2a2" +dependencies = [ + "cc", + "lazy_static", + "libc", + "regex", + "semver", +] + +[[package]] +name = "memchr" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" + +[[package]] +name = "regex" +version = "1.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", +] + +[[package]] +name = "regex-syntax" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" + +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + [[package]] name = "serene" version = "0.1.0" +dependencies = [ + "llvm-sys", +] + +[[package]] +name = "thread_local" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +dependencies = [ + "lazy_static", +] diff --git a/Cargo.toml b/Cargo.toml index eb6c23d..5c90b8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,3 +7,4 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +llvm-sys = "100" \ No newline at end of file diff --git a/src/ast.rs b/src/ast.rs index eaa0111..2085012 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -41,5 +41,5 @@ pub enum Expr { #[derive(Debug, Eq, PartialEq, Clone)] pub enum Error { - SyntaxError + SyntaxError, } diff --git a/src/core.rs b/src/core.rs new file mode 100644 index 0000000..6f72261 --- /dev/null +++ b/src/core.rs @@ -0,0 +1,3 @@ +pub trait Expression { + fn gen_code(&self); +} diff --git a/src/main.rs b/src/main.rs index 83b8006..c65056f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,14 +1,13 @@ +extern crate llvm_sys; + use std::string::String; pub mod ast; -pub mod reader; pub mod collections; - - +pub mod reader; fn main() { let input = String::from("(println \">>>>>\" '(+ 2 -3))"); - println!("{:?}", - reader::read_string(&input).unwrap()); + println!("{:?}", reader::read_string(&input).unwrap()); }