implemented method call

This commit is contained in:
Matthieu Jolimaitre 2024-10-25 15:52:47 +02:00
parent d3095d5980
commit d269425943
8 changed files with 352 additions and 253 deletions

View file

@ -1,6 +1,9 @@
use std::{env::args, fs};
use microlang::{Context, Value};
use microlang::{
eval::{Context, Value},
prelude::prelude,
};
pub fn main() {
// Context instantiation.
@ -15,6 +18,9 @@ pub fn main() {
Ok(Value::None)
});
// Import prelude.
prelude(&mut context);
// Script to evaluate.
let lines = fs::read_to_string(args().nth(1).expect("Pass a file as arg 1.")).expect("File could not be read.");