cl-repl: Rename from cl-frontend.
Also disable escape code printing when debug assertions are off
This commit is contained in:
parent
048e41836a
commit
862d81a9d4
@ -1,5 +1,5 @@
|
||||
[workspace]
|
||||
members = ["libconlang", "cl-frontend"]
|
||||
members = ["libconlang", "cl-repl"]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
|
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "cl-frontend"
|
||||
name = "cl-repl"
|
||||
repository.workspace = true
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
@ -1,6 +1,6 @@
|
||||
//! Collects identifiers into a list
|
||||
|
||||
use cl_frontend::repline::Repline;
|
||||
use cl_repl::repline::Repline;
|
||||
use conlang::{common::Loc, lexer::Lexer, parser::Parser};
|
||||
use std::{
|
||||
collections::HashMap,
|
@ -1,4 +1,4 @@
|
||||
use cl_frontend::{args::Args, cli::CLI};
|
||||
use cl_repl::{args::Args, cli::CLI};
|
||||
use std::error::Error;
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
@ -255,7 +255,9 @@ impl<'a, R: Read> Repline<'a, R> {
|
||||
}
|
||||
}
|
||||
c if c.is_ascii_control() => {
|
||||
eprint!("\\x{:02x}", c as u32);
|
||||
if cfg!(debug_assertions) {
|
||||
eprint!("\\x{:02x}", c as u32);
|
||||
}
|
||||
}
|
||||
c => {
|
||||
self.ed.push(c, stdout)?;
|
||||
@ -296,7 +298,9 @@ impl<'a, R: Read> Repline<'a, R> {
|
||||
}
|
||||
}
|
||||
other => {
|
||||
eprint!("{}", other.escape_unicode());
|
||||
if cfg!(debug_assertions) {
|
||||
eprint!("{}", other.escape_unicode());
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
Loading…
Reference in New Issue
Block a user