mirror of
https://github.com/TheM1Stery/izanami.git
synced 2025-04-19 16:31:11 +00:00
misc: cleanup
This commit is contained in:
parent
933b6e052d
commit
90f7755c0c
@ -3,7 +3,7 @@ use std::{cell::RefCell, fmt::Display, rc::Rc};
|
||||
use crate::{
|
||||
ast::Stmt,
|
||||
environment::Environment,
|
||||
interpreter::{execute_block, InterpreterEnvironment, InterpreterSignal, RuntimeError},
|
||||
interpreter::{execute_block, InterpreterEnvironment, InterpreterSignal},
|
||||
token::{LiteralType, Token},
|
||||
};
|
||||
|
||||
|
@ -1,9 +1,6 @@
|
||||
use std::{cell::RefCell, collections::HashMap, rc::Rc};
|
||||
|
||||
use crate::{
|
||||
callable::Callable,
|
||||
token::{LiteralType, Token},
|
||||
};
|
||||
use crate::token::{LiteralType, Token};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Environment {
|
||||
|
@ -22,7 +22,7 @@ fn main() -> ExitCode {
|
||||
return ExitCode::from(75);
|
||||
}
|
||||
|
||||
if let Err(RunError::RuntimeError(r)) = result {
|
||||
if let Err(RunError::RuntimeError(_r)) = result {
|
||||
return ExitCode::from(70);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
use crate::{ast::Expr, token::LiteralType};
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn pretty_print(expr: &Expr) -> String {
|
||||
match expr {
|
||||
Expr::Binary { left, op, right } => parenthesize(&op.lexeme, &[left, right]),
|
||||
|
@ -72,6 +72,7 @@ impl Scanner {
|
||||
Ok(&self.tokens)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn is_at_end(&self) -> bool {
|
||||
self.current >= self.source.len()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user