mirror of
https://github.com/lune-org/lune.git
synced 2025-05-04 10:43:57 +01:00
fix: remove orphan testing code
This commit is contained in:
parent
1051d55cdc
commit
bef0df6d91
1 changed files with 2 additions and 14 deletions
|
@ -1,5 +1,4 @@
|
|||
use std::{
|
||||
fmt::Write,
|
||||
io::ErrorKind,
|
||||
path::PathBuf,
|
||||
process::{exit, ExitCode},
|
||||
|
@ -9,15 +8,10 @@ use anyhow::Result;
|
|||
use clap::Command;
|
||||
use directories::UserDirs;
|
||||
use lune::lua::stdio::formatting::pretty_format_luau_error;
|
||||
use lune::{Lune, LuneError};
|
||||
use lune::Lune;
|
||||
use mlua::ExternalError;
|
||||
use rustyline::{error::ReadlineError, history::FileHistory, DefaultEditor, Editor};
|
||||
|
||||
enum PromptState {
|
||||
Regular,
|
||||
Continuation,
|
||||
}
|
||||
|
||||
// Isn't dependency injection plain awesome?!
|
||||
pub async fn show_interface(cmd: Command) -> Result<ExitCode> {
|
||||
let lune_version = cmd.get_version();
|
||||
|
@ -63,18 +57,12 @@ pub async fn show_interface(cmd: Command) -> Result<ExitCode> {
|
|||
}
|
||||
};
|
||||
|
||||
let mut prompt_kind: PromptState = PromptState::Regular;
|
||||
let mut interrupt_counter = 0u32;
|
||||
|
||||
loop {
|
||||
let mut source_code = String::new();
|
||||
|
||||
let prompt = match prompt_kind {
|
||||
PromptState::Regular => "> ",
|
||||
PromptState::Continuation => ">> ",
|
||||
};
|
||||
|
||||
match repl.readline(prompt) {
|
||||
match repl.readline("> ") {
|
||||
Ok(code) => {
|
||||
source_code = code.clone();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue