Réorganisation des dépendances avant la mise en place des tests

This commit is contained in:
2024-04-04 08:23:10 +02:00
parent 35c9ce4b5d
commit b218a4b427
7 changed files with 322 additions and 307 deletions

View File

@@ -5,7 +5,12 @@ use std::io::Write;
use std::process;
mod rlox;
mod scanner;
mod token_type;
mod token;
use crate::rlox::RLox;
use crate::scanner::Scanner;
// Exit codes from #include <sysexits.h>
const EX_OK: i32 = 0;
@@ -54,10 +59,8 @@ fn run_prompt() -> i32 {
exit_code
}
fn run( _script: String ) -> i32 {
fn run( script: String ) -> i32 {
let rlox_interpreter = RLox { had_error: false };
if rlox_interpreter.had_error { EX_DATAERR } else { EX_OK }
}