Renamed to 'kalk'.

This commit is contained in:
PaddiM8 2020-06-04 19:43:43 +02:00
parent bccbbee2c4
commit cbc0b340a1
14 changed files with 14 additions and 14 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
*/target
lek/Cargo.lock
kalk/Cargo.lock

View File

@ -1,5 +1,5 @@
[package]
name = "lek"
name = "kalk"
version = "0.1.0"
authors = ["paddi"]
edition = "2018"

View File

@ -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",
]

View File

@ -1,5 +1,5 @@
[package]
name = "lek_cli"
name = "kalk_cli"
version = "0.1.0"
authors = ["PaddiM8 <paddim8@pm.me>"]
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"

View File

@ -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() {

View File

@ -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) {

View File

@ -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,