mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-06-22 10:41:22 +02:00
Renamed to 'kalk'.
This commit is contained in:
parent
bccbbee2c4
commit
cbc0b340a1
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
*/target
|
||||
lek/Cargo.lock
|
||||
kalk/Cargo.lock
|
||||
|
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "lek"
|
||||
name = "kalk"
|
||||
version = "0.1.0"
|
||||
authors = ["paddi"]
|
||||
edition = "2018"
|
6
lek_cli/Cargo.lock → kalk_cli/Cargo.lock
generated
6
lek_cli/Cargo.lock → kalk_cli/Cargo.lock
generated
@ -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",
|
||||
]
|
||||
|
@ -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"
|
@ -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() {
|
@ -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) {
|
@ -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,
|
Loading…
x
Reference in New Issue
Block a user