diff --git a/.gitignore b/.gitignore index a525a01..03bf9d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ */target -lek/Cargo.lock +kalk/Cargo.lock diff --git a/lek/Cargo.toml b/kalk/Cargo.toml similarity index 94% rename from lek/Cargo.toml rename to kalk/Cargo.toml index e45a582..cbe672e 100644 --- a/lek/Cargo.toml +++ b/kalk/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "lek" +name = "kalk" version = "0.1.0" authors = ["paddi"] edition = "2018" diff --git a/lek/src/ast.rs b/kalk/src/ast.rs similarity index 100% rename from lek/src/ast.rs rename to kalk/src/ast.rs diff --git a/lek/src/interpreter.rs b/kalk/src/interpreter.rs similarity index 100% rename from lek/src/interpreter.rs rename to kalk/src/interpreter.rs diff --git a/lek/src/lexer.rs b/kalk/src/lexer.rs similarity index 100% rename from lek/src/lexer.rs rename to kalk/src/lexer.rs diff --git a/lek/src/lib.rs b/kalk/src/lib.rs similarity index 100% rename from lek/src/lib.rs rename to kalk/src/lib.rs diff --git a/lek/src/parser.rs b/kalk/src/parser.rs similarity index 100% rename from lek/src/parser.rs rename to kalk/src/parser.rs diff --git a/lek/src/prelude.rs b/kalk/src/prelude.rs similarity index 100% rename from lek/src/prelude.rs rename to kalk/src/prelude.rs diff --git a/lek/src/symbol_table.rs b/kalk/src/symbol_table.rs similarity index 100% rename from lek/src/symbol_table.rs rename to kalk/src/symbol_table.rs diff --git a/lek_cli/Cargo.lock b/kalk_cli/Cargo.lock similarity index 99% rename from lek_cli/Cargo.lock rename to kalk_cli/Cargo.lock index 5b3078d..f1e0e98 100644 --- a/lek_cli/Cargo.lock +++ b/kalk_cli/Cargo.lock @@ -135,7 +135,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "lek" +name = "kalk" version = "0.1.0" dependencies = [ "phf", @@ -143,11 +143,11 @@ dependencies = [ ] [[package]] -name = "lek_cli" +name = "kalk_cli" version = "0.1.0" dependencies = [ "ansi_term", - "lek", + "kalk", "rustyline", ] diff --git a/lek_cli/Cargo.toml b/kalk_cli/Cargo.toml similarity index 78% rename from lek_cli/Cargo.toml rename to kalk_cli/Cargo.toml index 27d8a5b..6377d66 100644 --- a/lek_cli/Cargo.toml +++ b/kalk_cli/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "lek_cli" +name = "kalk_cli" version = "0.1.0" authors = ["PaddiM8 "] edition = "2018" @@ -8,6 +8,6 @@ edition = "2018" panic = "abort" [dependencies] -lek = { path = "../lek" } +kalk = { path = "../kalk" } rustyline = "6.1.2" ansi_term = "0.12" diff --git a/lek_cli/src/main.rs b/kalk_cli/src/main.rs similarity index 93% rename from lek_cli/src/main.rs rename to kalk_cli/src/main.rs index a331ed7..c5e2124 100644 --- a/lek_cli/src/main.rs +++ b/kalk_cli/src/main.rs @@ -1,8 +1,8 @@ mod output; mod repl; -use lek::parser::Unit; -use lek::parser::{self}; +use kalk::parser::Unit; +use kalk::parser::{self}; use std::env; fn main() { diff --git a/lek_cli/src/output.rs b/kalk_cli/src/output.rs similarity index 94% rename from lek_cli/src/output.rs rename to kalk_cli/src/output.rs index 7f13eda..f53ed8e 100644 --- a/lek_cli/src/output.rs +++ b/kalk_cli/src/output.rs @@ -1,5 +1,5 @@ use ansi_term::Colour::Red; -use lek::parser::{self}; +use kalk::parser::{self}; pub fn eval(parser: &mut parser::Context, input: &str) { match parser::parse(parser, input, 53) { diff --git a/lek_cli/src/repl.rs b/kalk_cli/src/repl.rs similarity index 76% rename from lek_cli/src/repl.rs rename to kalk_cli/src/repl.rs index c822cec..ffe95b4 100644 --- a/lek_cli/src/repl.rs +++ b/kalk_cli/src/repl.rs @@ -1,19 +1,19 @@ use crate::output; use ansi_term::Colour::Cyan; -use lek::parser; +use kalk::parser; use rustyline::error::ReadlineError; use rustyline::Editor; use std::process; pub fn start(mut parser: &mut parser::Context) { - let mut rl = Editor::<()>::new(); + let mut editor = Editor::<()>::new(); loop { - let readline = rl.readline(&Cyan.paint(">> ").to_string()); + let readline = editor.readline(&Cyan.paint(">> ").to_string()); match readline { Ok(input) => { - rl.add_history_entry(input.as_str()); + editor.add_history_entry(input.as_str()); eval_repl(&mut parser, &input); } Err(ReadlineError::Interrupted) => break,