added a way to create env function that have access to the executor
This commit is contained in:
parent
58b1b2f94b
commit
7399a6d2ef
4 changed files with 14 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
use core::panic;
|
||||
|
||||
use crate::lexer::{Token, TokenType};
|
||||
use crate::{executor::Executor, lexer::{Token, TokenType}};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub enum ASTPart {
|
||||
|
@ -120,7 +120,7 @@ pub struct AstContinue {
|
|||
}
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct AstRustFunction {
|
||||
pub func: fn(Vec<ASTPart>) -> ASTPart,
|
||||
pub func: fn(&mut Executor, Vec<ASTPart>) -> ASTPart,
|
||||
pub pos: usize
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue