From 9ea0583121c465335135c051af04e3f3ede37e33 Mon Sep 17 00:00:00 2001 From: LunaStev Date: Mon, 23 Dec 2024 20:06:43 +0900 Subject: [PATCH] ast; adding --- src/parser.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/parser.rs b/src/parser.rs index bff85c6..c085561 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -119,7 +119,9 @@ impl<'a> Parser<'a> { name, params, body, - }) + }); + + ast; } fn variable(&mut self, ast: &mut AST) { @@ -252,6 +254,8 @@ impl<'a> Parser<'a> { message, newline: true, }); + + ast; } fn if_statement(&mut self, ast: &mut AST) { @@ -305,6 +309,8 @@ impl<'a> Parser<'a> { body: vec![], else_body: None, }); + + ast; } fn while_statement(&mut self, ast: &mut AST) { @@ -462,5 +468,7 @@ impl<'a> Parser<'a> { ast.add_node(ASTNode::Import { module_name: "".to_string() }); + + ast; } }