mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-16 02:15:01 +01:00
do functions work finally maybe
This commit is contained in:
parent
ebd3dd8d82
commit
237fb34d97
12 changed files with 132 additions and 86 deletions
10
src/lib.rs
10
src/lib.rs
|
|
@ -1,4 +1,4 @@
|
|||
#![deny(clippy::disallowed_type)]
|
||||
#![deny(clippy::disallowed_types)]
|
||||
|
||||
mod ast;
|
||||
mod bytecode;
|
||||
|
|
@ -10,14 +10,14 @@ mod parse;
|
|||
mod util;
|
||||
mod vm;
|
||||
|
||||
use crate::ast::Program;
|
||||
use crate::gc::RtAlloc;
|
||||
use std::io::Write;
|
||||
|
||||
pub use bumpalo::Bump;
|
||||
pub use lex::*;
|
||||
pub use parse::*;
|
||||
|
||||
use crate::{ast::Program, gc::RtAlloc};
|
||||
|
||||
#[cfg(not(feature = "fxhash"))]
|
||||
#[allow(clippy::disallowed_types)]
|
||||
type HashMap<K, V> = std::collections::HashMap<K, V>;
|
||||
|
|
@ -73,8 +73,8 @@ fn process_ast(program: &str, ast: &Program, mut runtime: RtAlloc, cfg: &mut Con
|
|||
}
|
||||
|
||||
let result = vm::execute(code, runtime, cfg);
|
||||
if let Err(result) = result {
|
||||
eprintln!("error: {}", result);
|
||||
if let Err(msg) = result {
|
||||
eprintln!("error: {msg}");
|
||||
}
|
||||
}
|
||||
Err(err) => errors::display_error(program, err),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue