added function calls, Rust functions, enviroment

This commit is contained in:
afonya2 2025-05-24 19:18:26 +02:00
parent 867cea5046
commit 58b1b2f94b
Signed by: afonya
GPG key ID: EBB9C4CAFAAFB2DC
5 changed files with 94 additions and 8 deletions

View file

@ -21,6 +21,7 @@ pub enum ASTPart {
Break(AstBreak),
For(AstFor),
Continue(AstContinue),
RustFunction(AstRustFunction),
NOOP
}
#[derive(Debug, Clone, PartialEq)]
@ -117,6 +118,11 @@ pub struct AstFor {
pub struct AstContinue {
pub pos: usize
}
#[derive(Debug, Clone, PartialEq)]
pub struct AstRustFunction {
pub func: fn(Vec<ASTPart>) -> ASTPart,
pub pos: usize
}
fn is_end(input: &Token, end: &Vec<Token>) -> bool {
for token in end {