New variable system and stage 1 error checking

This commit is contained in:
2024-06-12 22:16:43 +02:00
parent 3434b4c0bd
commit ea7222255a
6 changed files with 410 additions and 224 deletions
+5 -2
View File
@@ -6,9 +6,9 @@ mod parser;
mod transpiler;
mod variable;
use clap::Parser;
use parser::new_vars;
use std::{fs, path::Path};
use transpiler::Transpiler;
use variable::Variables;
use crate::lsp::run_lsp_server;
@@ -38,7 +38,10 @@ fn main() {
}
fs::create_dir("build").expect("error making build");
let mut trsp = Transpiler::default();
let transpiled_code = trsp.transpile(file_content, 0, new_vars());
let transpiled_code = trsp.transpile(file_content, 0, Variables::new());
for problem in trsp.problems {
println!("{}", problem.problem_msg)
}
match args.rust {
Some(ref rust_file_name) => {