From bc87f8cd90a5bf294e451b05551dcf954f34d35c Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 4 Mar 2020 11:25:23 -0800 Subject: [PATCH] Initial work --- Cargo.lock | 5 +++++ Cargo.toml | 1 + partis/Cargo.toml | 9 +++++++++ partis/src/lib.rs | 17 +++++++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 partis/Cargo.toml create mode 100644 partis/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 4745d31..274f083 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -461,6 +461,10 @@ dependencies = [ "autocfg 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "partis" +version = "0.1.0" + [[package]] name = "phf" version = "0.7.24" @@ -739,6 +743,7 @@ name = "schala" version = "0.1.0" dependencies = [ "includedir_codegen 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "partis 0.1.0", "schala-lang 0.1.0", "schala-repl 0.1.0", ] diff --git a/Cargo.toml b/Cargo.toml index 651e8c1..79384be 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ authors = ["greg "] schala-repl = { path = "schala-repl" } schala-lang = { path = "schala-lang/language" } +partis = { path="partis" } # maaru-lang = { path = "maaru" } # rukka-lang = { path = "rukka" } # robo-lang = { path = "robo" } diff --git a/partis/Cargo.toml b/partis/Cargo.toml new file mode 100644 index 0000000..70c8a03 --- /dev/null +++ b/partis/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "partis" +version = "0.1.0" +authors = ["greg "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/partis/src/lib.rs b/partis/src/lib.rs new file mode 100644 index 0000000..470eac8 --- /dev/null +++ b/partis/src/lib.rs @@ -0,0 +1,17 @@ +struct ParseError { } + +enum ParseResult<'a, T> { + Success(T, &'a str), + Failure(ParseError), + Incomplete, +} + + +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + assert_eq!(2 + 2, 4); + } + +}