small change

This commit is contained in:
2024-04-17 19:19:27 +02:00
parent b24b34cb44
commit 1626137ad6
+2
View File
@@ -57,6 +57,8 @@ pub fn transpile(input: String, indent: u32) -> String {
} else {
result += format!("let mut {}: {}", ast.tokens[1].value, ast.tokens[0].value).as_str();
}
} else if ast.tokens.len() == 1 && ast.tokens[0].token_type == TokenType::Round {
result += format!("({})", ast.tokens[0].value).as_str();
} else {
if ast.tokens[0].token_type==TokenType::Newline {
result += (ast.tokens[0].value.as_str().to_owned() + (" ".repeat((indent as usize)*2).as_str())).as_str()