From 8f66a64924519d172dee5ee0109e3c4e7e683e49 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 21 Sep 2023 15:41:12 -0500 Subject: [PATCH] Initial Commit --- .gitignore | 2 ++ Cargo.toml | 9 +++++++++ dummy.cl | 1 + libconlang/.gitignore | 1 + libconlang/Cargo.toml | 9 +++++++++ libconlang/src/lib.rs | 40 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 62 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 dummy.cl create mode 100644 libconlang/.gitignore create mode 100644 libconlang/Cargo.toml create mode 100644 libconlang/src/lib.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..99e62e2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +**/Cargo.lock +target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..1d396ae --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,9 @@ +[workspace] +members = ["libconlang"] +resolver = "2" + +[workspace.package] +version = "0.0.1" +authors = ["John Breaux"] +edition = "2021" +license = "MIT" diff --git a/dummy.cl b/dummy.cl new file mode 100644 index 0000000..2517554 --- /dev/null +++ b/dummy.cl @@ -0,0 +1 @@ +// This is an example Conlang file. diff --git a/libconlang/.gitignore b/libconlang/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/libconlang/.gitignore @@ -0,0 +1 @@ +/target diff --git a/libconlang/Cargo.toml b/libconlang/Cargo.toml new file mode 100644 index 0000000..77e7773 --- /dev/null +++ b/libconlang/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "conlang" +version.workspace = true +edition.workspace = true +authors.workspace = true + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/libconlang/src/lib.rs b/libconlang/src/lib.rs new file mode 100644 index 0000000..4a63e1c --- /dev/null +++ b/libconlang/src/lib.rs @@ -0,0 +1,40 @@ +//! Conlang is an expression-based programming language + +pub mod token { + //! Stores a component of a file as a type and span +} + +pub mod ast { + //! Stores functions, data structure definitions, etc. +} + +pub mod lexer { + //! Converts a text file into tokens +} + +pub mod parser { + //! Parses tokens into an AST +} + +pub mod interpreter { + //! Interprets an AST as a program +} + +#[cfg(test)] +mod tests { + mod token { + // TODO + } + mod ast { + // TODO + } + mod lexer { + // TODO + } + mod parser { + // TODO + } + mod interpreter { + // TODO + } +}