Skip to content

Commit

Permalink
ast; adding
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaStev committed Dec 23, 2024
1 parent ada7a91 commit 9ea0583
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ impl<'a> Parser<'a> {
name,
params,
body,
})
});

ast;
}

fn variable(&mut self, ast: &mut AST) {
Expand Down Expand Up @@ -252,6 +254,8 @@ impl<'a> Parser<'a> {
message,
newline: true,
});

ast;
}

fn if_statement(&mut self, ast: &mut AST) {
Expand Down Expand Up @@ -305,6 +309,8 @@ impl<'a> Parser<'a> {
body: vec![],
else_body: None,
});

ast;
}

fn while_statement(&mut self, ast: &mut AST) {
Expand Down Expand Up @@ -462,5 +468,7 @@ impl<'a> Parser<'a> {
ast.add_node(ASTNode::Import {
module_name: "".to_string()
});

ast;
}
}

0 comments on commit 9ea0583

Please # to comment.