cl-lexer: Move lexer into its own crate

This commit is contained in:
2024-02-29 20:58:50 -06:00
parent abf00f383c
commit 50b473cd55
15 changed files with 198 additions and 188 deletions

View File

@@ -74,12 +74,9 @@ pub mod program {
};
use cl_ast::{self as ast, ast_impl::format::Pretty};
use cl_lexer::Lexer;
use cl_parser::{error::PResult, Parser};
use conlang::{
// pretty_printer::{PrettyPrintable, Printer},
lexer::Lexer,
resolver::{error::TyResult, Resolver},
};
use conlang::resolver::{error::TyResult, Resolver};
use std::{fmt::Display, io::Write};
pub struct Parsable;
@@ -228,7 +225,7 @@ pub mod cli {
match (repl, path) {
(true, Some(path)) => {
let prog = std::fs::read_to_string(path).unwrap();
let code = cl_parser::Parser::new(conlang::lexer::Lexer::new(&prog))
let code = cl_parser::Parser::new(cl_lexer::Lexer::new(&prog))
.file()
.unwrap();
let mut env = cl_interpret::env::Environment::new();