added int

This commit is contained in:
2024-05-09 16:36:07 +02:00
parent 968e9c3c66
commit 08fedf845c
+3 -1
View File
@@ -3,7 +3,9 @@ use crate::parser::{Parser, AstType};
pub fn transpile(input: String, indent: u32, state: LexerState) -> String {
let mut result = String::new();
if indent > 0 {
if indent == 0 {
result += "type int = i32;\n";
} else {
result += " ".repeat((indent as usize)*2).as_str();
}
let lexer_out = lex(input.as_str(), false, state);